Functions

Data Compression Utilities
[Utilities]

Collaboration diagram for Data Compression Utilities:

Functions

int imCompressDataZ (const void *src_data, int src_size, void *dst_data, int dst_size, int zip_quality)
int imCompressDataUnZ (const void *src_data, int src_size, void *dst_data, int dst_size)
int imCompressDataLZF (const void *src_data, int src_size, void *dst_data, int dst_size)
int imCompressDataUnLZF (const void *src_data, int src_size, void *dst_data, int dst_size)
int imCompressDataLZ4 (const void *src_data, int src_size, void *dst_data, int dst_size)
int imCompressDataUnLZ4 (const void *src_data, int src_size, void *dst_data, int dst_size)

Detailed Description

Deflate compression support uses zlib version 1.2.8.
http://www.zlib.org/
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
LZF compression support uses libLZF version 3.5.
http://software.schmorp.de/pkg/liblzf
Copyright (C) 2000-2009 Marc Alexander Lehmann
LZ4 compression support uses LZ4 version 1.9.3.
https://lz4.github.io/lz4/
Copyright (c) 2011-2016, Yann Collet

See im_util.h


Function Documentation

int imCompressDataZ ( const void *  src_data,
int  src_size,
void *  dst_data,
int  dst_size,
int  zip_quality 
)

Compresses the data using the ZLIB Deflate compression.
The destination buffer must be at least 0.1% larger than source_size plus 12 bytes.
It compresses raw byte data. zip_quality can be 1 to 9.
Returns the size of the compressed buffer or zero if failed.

int imCompressDataUnZ ( const void *  src_data,
int  src_size,
void *  dst_data,
int  dst_size 
)

Uncompresses the data compressed with the ZLIB Deflate compression.
Returns zero if failed.

int imCompressDataLZF ( const void *  src_data,
int  src_size,
void *  dst_data,
int  dst_size 
)

Compresses the data using the libLZF compression.
Returns the size of the compressed buffer or zero if failed.

int imCompressDataUnLZF ( const void *  src_data,
int  src_size,
void *  dst_data,
int  dst_size 
)

Uncompresses the data compressed with the libLZF compression.
Returns zero if failed.

int imCompressDataLZ4 ( const void *  src_data,
int  src_size,
void *  dst_data,
int  dst_size 
)

Compresses the data using the libLZ4 compression. (Since 3.15)
Returns the size of the compressed buffer or zero if failed.
Available in a separate library called "im_lz4".

int imCompressDataUnLZ4 ( const void *  src_data,
int  src_size,
void *  dst_data,
int  dst_size 
)

Uncompresses the data compressed with the libLZ4 compression. (Since 3.15)
Returns zero if failed.
Available in a separate library called "im_lz4".