afe7cf78d5
This patch adds the deflateResetKeep() function to retain the sliding window for the next deflate operation, and fixes an inflateResetKeep() problem that came from inflate() not updating the window when the stream completed. This enables constructing and decompressing a series of concatenated deflate streams where each can depend on the history of uncompressed data that precedes it. This generalizes deflateSetDictionary() and inflateSetDictionary() to permit setting the dictionary in the middle of a stream for raw deflate and inflate. This in combination with the Keep functions enables a scheme for updating files block by block with the transmission of compressed data, where blocks are sent with deflateResetKeep() to retain history for better compression, and deflateSetDictionary() is used for blocks already present at the receiver to skip compression but insert that data in the history, again for better compression. The corresponding inflate calls are done on the receiver side.
187 lines
7.0 KiB
Plaintext
187 lines
7.0 KiB
Plaintext
STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB')
|
|
|
|
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
|
/* Version 1.1.3 entry points. */
|
|
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
|
|
|
/********************************************************************/
|
|
/* *MODULE ADLER32 ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("adler32")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE COMPRESS ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("compress")
|
|
EXPORT SYMBOL("compress2")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE CRC32 ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("crc32")
|
|
EXPORT SYMBOL("get_crc_table")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("deflate")
|
|
EXPORT SYMBOL("deflateEnd")
|
|
EXPORT SYMBOL("deflateSetDictionary")
|
|
EXPORT SYMBOL("deflateCopy")
|
|
EXPORT SYMBOL("deflateReset")
|
|
EXPORT SYMBOL("deflateResetKeep")
|
|
EXPORT SYMBOL("deflateParams")
|
|
EXPORT SYMBOL("deflatePending")
|
|
EXPORT SYMBOL("deflatePrime")
|
|
EXPORT SYMBOL("deflateInit_")
|
|
EXPORT SYMBOL("deflateInit2_")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE GZIO ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("gzopen")
|
|
EXPORT SYMBOL("gzdopen")
|
|
EXPORT SYMBOL("gzsetparams")
|
|
EXPORT SYMBOL("gzread")
|
|
EXPORT SYMBOL("gzwrite")
|
|
EXPORT SYMBOL("gzprintf")
|
|
EXPORT SYMBOL("gzputs")
|
|
EXPORT SYMBOL("gzgets")
|
|
EXPORT SYMBOL("gzputc")
|
|
EXPORT SYMBOL("gzflush")
|
|
EXPORT SYMBOL("gzseek")
|
|
EXPORT SYMBOL("gzrewind")
|
|
EXPORT SYMBOL("gztell")
|
|
EXPORT SYMBOL("gzeof")
|
|
EXPORT SYMBOL("gzclose")
|
|
EXPORT SYMBOL("gzerror")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("inflate")
|
|
EXPORT SYMBOL("inflateEnd")
|
|
EXPORT SYMBOL("inflateSetDictionary")
|
|
EXPORT SYMBOL("inflateSync")
|
|
EXPORT SYMBOL("inflateReset")
|
|
EXPORT SYMBOL("inflateInit_")
|
|
EXPORT SYMBOL("inflateInit2_")
|
|
EXPORT SYMBOL("inflateSyncPoint")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE UNCOMPR ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("uncompress")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE ZUTIL ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("zlibVersion")
|
|
EXPORT SYMBOL("zError")
|
|
|
|
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
|
/* Version 1.2.1 additional entry points. */
|
|
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
|
|
|
/********************************************************************/
|
|
/* *MODULE COMPRESS ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("compressBound")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("deflateBound")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE GZIO ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("gzungetc")
|
|
EXPORT SYMBOL("gzclearerr")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE INFBACK ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("inflateBack")
|
|
EXPORT SYMBOL("inflateBackEnd")
|
|
EXPORT SYMBOL("inflateBackInit_")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("inflateCopy")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE ZUTIL ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("zlibCompileFlags")
|
|
|
|
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
|
/* Version 1.2.5 additional entry points. */
|
|
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
|
|
|
/********************************************************************/
|
|
/* *MODULE ADLER32 ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("adler32_combine")
|
|
EXPORT SYMBOL("adler32_combine64")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE CRC32 ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("crc32_combine")
|
|
EXPORT SYMBOL("crc32_combine64")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE GZLIB ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("gzbuffer")
|
|
EXPORT SYMBOL("gzoffset")
|
|
EXPORT SYMBOL("gzoffset64")
|
|
EXPORT SYMBOL("gzopen64")
|
|
EXPORT SYMBOL("gzseek64")
|
|
EXPORT SYMBOL("gztell64")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE GZREAD ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("gzclose_r")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE GZWRITE ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("gzclose_w")
|
|
EXPORT SYMBOL("gzgetc_")
|
|
EXPORT SYMBOL("gzflags")
|
|
|
|
/********************************************************************/
|
|
/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */
|
|
/********************************************************************/
|
|
|
|
EXPORT SYMBOL("inflateMark")
|
|
EXPORT SYMBOL("inflatePrime")
|
|
EXPORT SYMBOL("inflateReset2")
|
|
EXPORT SYMBOL("inflateUndermine")
|
|
EXPORT SYMBOL("inflateResetKeep")
|
|
|
|
ENDPGMEXP
|