OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
zlib_uefi.c File Reference
#include "zutil.h"
#include <Library/MemoryAllocationLib.h>
#include <Library/OcCompressionLib.h>

Go to the source code of this file.

Functions

voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
 
void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
 
UINT8 * CompressZLIB (OUT UINT8 *Dst, IN UINT32 DstLen, IN CONST UINT8 *Src, IN UINT32 SrcLen)
 
UINTN DecompressZLIB (OUT UINT8 *Dst, IN UINTN DstLen, IN CONST UINT8 *Src, IN UINTN SrcLen)
 
UINT32 Adler32 (IN CONST UINT8 *Buffer, IN UINT32 BufferLen)
 

Detailed Description

Copyright (C) 2019, vit9696. All rights reserved.

All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file zlib_uefi.c.

Function Documentation

◆ Adler32()

UINT32 Adler32 ( IN CONST UINT8 * Buffer,
IN UINT32 BufferLen )

Calculates Adler32 checksum.

Parameters
[in]BufferSource buffer.
[in]BufferLenSource buffer size.
Returns
Checksum on success otherwise 0.

Definition at line 80 of file zlib_uefi.c.

◆ CompressZLIB()

UINT8 * CompressZLIB ( OUT UINT8 * Dst,
IN UINT32 DstLen,
IN CONST UINT8 * Src,
IN UINT32 SrcLen )

Compress buffer with ZLIB algorithm.

Parameters
[out]DstDestination buffer.
[in]DstLenDestination buffer size.
[in]SrcSource buffer.
[in]SrcLenSource buffer size.
Returns
Dst + CompressedLen on success otherwise NULL.

Definition at line 38 of file zlib_uefi.c.

◆ DecompressZLIB()

UINTN DecompressZLIB ( OUT UINT8 * Dst,
IN UINTN DstLen,
IN CONST UINT8 * Src,
IN UINTN SrcLen )

Decompress buffer with ZLIB algorithm.

Parameters
[out]DstDestination buffer.
[in]DstLenDestination buffer size.
[in]SrcSource buffer.
[in]SrcLenSource buffer size.
Returns
DecompressedLen on success otherwise 0.

Definition at line 59 of file zlib_uefi.c.

◆ zcalloc()

voidpf ZLIB_INTERNAL zcalloc ( voidpf opaque,
unsigned items,
unsigned size )

Definition at line 20 of file zlib_uefi.c.

◆ zcfree()

void ZLIB_INTERNAL zcfree ( voidpf opaque,
voidpf ptr )

Definition at line 29 of file zlib_uefi.c.