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 imCompressDataLZO (const void *src_data, int src_size, void *dst_data, int dst_size)
int imCompressDataUnLZO (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
LZO compression support uses mini-libLZO version 2.07.
http://www.oberhumer.com/opensource/lzo/
Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
But its License is GPL, so we kept it in a separate library called "im_lzo" that is also GPL.

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 imCompressDataLZO ( const void *  src_data,
int  src_size,
void *  dst_data,
int  dst_size 
)

Compresses the data using the libLZO compression. (Since 3.9)
Returns the size of the compressed buffer or zero if failed.
Available in a separate library called "im_lzo" which license is GPL.

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

Uncompresses the data compressed with the libLZO compression. (Since 3.9)
Returns zero if failed.
Available in a separate library called "im_lzo" which license is GPL.