<< prev | up | next >>
<brieflz.h> - blz_pack
size_t blz_pack( const void *source,
                 void *destination,
                 size_t length,
                 void *workmem );

Compresses length bytes of data from source[] into destination[], using workmem[] for temporary storage.

The destination[] buffer should be large enough to hold blz_max_packed_size(length) bytes.

The workmem[] buffer should be blz_workmem_size(length) bytes large.

Parameters:
source - pointer to the data to be compressed.
destination - pointer to where the compressed data should be stored.
length - the length of the uncompressed data in bytes.
workmem - pointer to the work memory which is used during compression.
Returns:
the length of the compressed data, or -1 on error.
 
<< prev | up | next >>