
(The size of the uncompressed data must have been saved Of the destination buffer, which must be large enough to hold the entire


ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)) ĭecompresses the source buffer into the destination buffer. Upon exit, destLen is the actual size of theĬompress returns Z_OK if success, Z_MEM_ERROR if there was notĮnough memory, Z_BUF_ERROR if there was not enough room in the output Of the destination buffer, which must be at least the value returned byĬompressBound(sourceLen). ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)) Ĭompresses the source buffer into the destination buffer. See the source code of zlib for an answer. Zlib.h has all the functions you need: compress (or compress2) and uncompress.
