#include <cel_compress.h>
Public Types | |
enum | { levelDefault = -1 } |
Static Public Member Functions | |
static void | compress (SimpleArray< u8 > &outBuffer, const u8 *CEL_RESTRICT inData, size_t inSize, int compLevel=levelDefault) |
static void | compress (u8 *CEL_RESTRICT outBuffer, size_t *CEL_RESTRICT ioSize, const u8 *CEL_RESTRICT inData, size_t inSize, int compLevel=levelDefault) |
static void | decompress (SimpleArray< u8 > &outBuffer, const u8 *CEL_RESTRICT inData, size_t inSize) |
static void | decompress (u8 *CEL_RESTRICT outBuffer, size_t *ioSize, const u8 *CEL_RESTRICT inData, size_t inSize) |
static u32 | adler32 (u32 inCurrentAdler, const u8 *CEL_RESTRICT inData, size_t inSize) |
static u32 | crc32 (u32 inCurrentCRC, const u8 *CEL_RESTRICT inData, size_t inSize) |
Compression/Decompression using zlib.
anonymous enum |
Enumerator | |
---|---|
levelDefault |
compression level default; used with compress function. |
|
static |
This function updates zlib origin Adler-32 checksum.\n If \a inData is \c NULL, this funcion returnes the initial value for the checksum. \param inCurrentCRC Current checksum value. \param inData \param inData Pointer that points the data to be verified. \param inSize The size of the data specified by \a inData. The following code is a sample usage of this function:
|
static |
This function compresses the specified data using zlib.
outBuffer | A buffer to receive the compressed result. |
inData | Pointer that points the data to be compressed. |
inSize | The size of the data specified by inData. |
compLevel | Compression level in 1-9. Smaller number means faster but low-compression ratio. levelDefault currently stands for 6. |
|
static |
This function compresses the specified data using zlib.
outBuffer | A buffer to receive the compressed result. |
ioSize | [IN] The size of the buffer specified by outBuffer. [OUT] The bytes written on the outBuffer. |
inData | Pointer that points the data to be compressed. |
inSize | The size of the data specified by inData. |
compLevel | Compression level in 1-9. Smaller number means faster but low-compression ratio. levelDefault currently stands for 6. |
|
static |
This function updates CRC32 checksum.\n If \a inData is \c NULL, this funcion returnes the initial value for the checksum. \param inCurrentCRC Current checksum value. \param inData \param inData Pointer that points the data to be verified. \param inSize The size of the data specified by \a inData. The following code is a sample usage of this function:
|
static |
This function decompresses the specified data using zlib.
outBuffer | A buffer to receive the decompressed result. This buffer must be large enough to receive the decompressed result. |
inData | Pointer that points the data to be decompressed. |
inSize | The size of the data specified by inData. |
|
static |
This function decompresses the specified data using zlib.
outBuffer | The buffer to receive the decompressed result. |
ioSize | [IN] The size of the buffer specified by outBuffer. [OUT] The bytes written on the outBuffer. |
inData | Pointer that points the data to be decompressed. |
inSize | The size of the data specified by inData. |