From afe7cf78d51b819dcdc5b0f4cb85a25a52a9fcd0 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Wed, 7 Dec 2011 23:57:37 -0800 Subject: Enable dictionary setting in middle of stream, and keeping the dictionary. 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. --- zlib.map | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'zlib.map') diff --git a/zlib.map b/zlib.map index dd27591..80c4774 100644 --- a/zlib.map +++ b/zlib.map @@ -76,3 +76,7 @@ ZLIB_1.2.5.2 { gzgetc_; inflateResetKeep; } ZLIB_1.2.5.1; + +ZLIB_1.2.5.3 { + deflateResetKeep; +} ZLIB_1.2.5.2; -- cgit v1.2.1