summaryrefslogtreecommitdiff
path: root/zlib.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2017-01-15 08:22:16 -0800
committerMark Adler <madler@alumni.caltech.edu>2017-01-15 09:29:40 -0800
commitcbbd20302c6e3fb626bee5bd8b4932524049515c (patch)
tree91a632d17b1f7596af41e10537872ed02ee87d33 /zlib.h
parent7d9c9d410a7f8c732fdb0cac2b268659d624a6b6 (diff)
downloadzlib-cbbd20302c6e3fb626bee5bd8b4932524049515c.tar.gz
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 feabc54..a4b3baf 100644
--- a/zlib.h
+++ b/zlib.h
@@ -712,10 +712,11 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
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