aboutsummaryrefslogtreecommitdiff
path: root/zconf.h.cmakein
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-12-07 23:57:37 -0800
committerMark Adler <madler@alumni.caltech.edu>2011-12-08 00:13:52 -0800
commitafe7cf78d51b819dcdc5b0f4cb85a25a52a9fcd0 (patch)
tree24c9db96071504cd7beb1d1800dbb265c736070f /zconf.h.cmakein
parentfbac04f666339eef3678e4eb81b25ae69bfcbd81 (diff)
downloadzlib-afe7cf78d51b819dcdc5b0f4cb85a25a52a9fcd0.tar.gz
zlib-afe7cf78d51b819dcdc5b0f4cb85a25a52a9fcd0.tar.bz2
zlib-afe7cf78d51b819dcdc5b0f4cb85a25a52a9fcd0.zip
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.
Diffstat (limited to 'zconf.h.cmakein')
-rw-r--r--zconf.h.cmakein1
1 files changed, 1 insertions, 0 deletions
diff --git a/zconf.h.cmakein b/zconf.h.cmakein
index b2d78b3..3ea5531 100644
--- a/zconf.h.cmakein
+++ b/zconf.h.cmakein
@@ -48,6 +48,7 @@
48# define deflatePending z_deflatePending 48# define deflatePending z_deflatePending
49# define deflatePrime z_deflatePrime 49# define deflatePrime z_deflatePrime
50# define deflateReset z_deflateReset 50# define deflateReset z_deflateReset
51# define deflateResetKeep z_deflateResetKeep
51# define deflateSetDictionary z_deflateSetDictionary 52# define deflateSetDictionary z_deflateSetDictionary
52# define deflateSetHeader z_deflateSetHeader 53# define deflateSetHeader z_deflateSetHeader
53# define deflateTune z_deflateTune 54# define deflateTune z_deflateTune