summaryrefslogtreecommitdiff
path: root/zlib.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2017-01-15 08:22:16 -0800
committerHans Kristian Rosbach <hk-git@circlestorm.org>2017-02-13 10:12:11 +0100
commit5c01bb54f24dc7e7e60787b4d29990e992fdf98a (patch)
treeb3d413fa9c86526d2c771fbe1c56817eed64f3da /zlib.h
parentae98290ecd90fab08f950de37319bfeac45c816b (diff)
Permit immediate deflateParams changes before any deflate input.
This permits deflateParams to change the strategy and level right after deflateInit, without having to wait until a header has been written. The parameters can be changed immediately up until the first deflate call that consumes any input data.
Diffstat (limited to 'zlib.h')
-rw-r--r--zlib.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/zlib.h b/zlib.h
index ab0b41d..119b392 100644
--- a/zlib.h
+++ b/zlib.h
@@ -704,10 +704,11 @@ ZEXTERN int ZEXPORT deflateParams(z_stream *strm, int level, int strategy);
used to switch between compression and straight copy of the input data, or
to switch to a different kind of input data requiring a different strategy.
If the compression approach (which is a function of the level) or the
- strategy is changed, then the input available so far is compressed with the
- old level and strategy using deflate(strm, Z_BLOCK). There are three
- approaches for the compression levels 0, 1..3, and 4..9 respectively. The
- new level and strategy will take effect at the next call of deflate().
+ strategy is changed, and if any input has been consumed in a previous
+ deflate() call, then the input available so far is compressed with the old
+ level and strategy using deflate(strm, Z_BLOCK). There are three approaches
+ for the compression levels 0, 1..3, and 4..9 respectively. The new level
+ and strategy will take effect at the next call of deflate().
If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
not have enough output space to complete, then the parameter change will not