IM: Data Compression Utilities

IM - An Imaging Tool

Data Compression Utilities
[Utilities]


Detailed Description

Deflate compression support uses zlib version 1.2.3.
http://www.zlib.org/
Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler
LZF compression support uses libLZF version 1.51.
http://liblzf.plan9.de/
Copyright (C) 2000-2005 Marc Alexander Lehmann 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)
int imCompressDataLZF (const void *src_data, int src_size, void *dst_data, int dst_size, int zip_quality)
int imCompressDataUnLZF (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 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,
int  zip_quality
 

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.