IM: Data Compression Utilities

IM - Imaging Libray

Data Compression Utilities
[Utilities]


Detailed Description

See im_util.h


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)

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.

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

Uncompresses the data compressed with the ZLIB Deflate compression.