compress — Attempts to compress sourceLen
bytes of data in the buffer source,
placing the result in the buffer dest
.
Libz.lib
compress()
shall return Z_OK, otherwise compress()
returns a value to indicate the
error.
compress()
function
attempts to
compress
sourceLen bytes of data in the buffer
source, placing the result in the
buffer
dest.
On entry, destLen points to a value describing the size of the dest buffer. The application should ensure that this value should atleast be (sourceLen × 1.001) + 12. On successful exit, the variable referenced by destLen shall be updated to hold the length of compressed data in dest.
The compress()
function is equivalent to compress2()
with a level
of
Z_DEFAULT_LEVEL
.
To compress string "hello" with level value 6:
#include <stdio.h> void Compress2() { |
For additional information or queries on this page send
feedback
© 2005-2007 Nokia |