summaryrefslogtreecommitdiff
path: root/deflate.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2015-08-02 00:02:07 -0700
committerMark Adler <madler@alumni.caltech.edu>2015-08-02 00:06:28 -0700
commit43bfaba3d718a27c1b137b1d1aa90d9427ab4a4f (patch)
treefb7c69e03cfe457070945ca5e35f04267126a323 /deflate.c
parentb4ce6caf0992296230e4e25b22a63e418bdf4dcf (diff)
downloadzlib-43bfaba3d718a27c1b137b1d1aa90d9427ab4a4f.tar.gz
Align deflateParams() and its documentation in zlib.h.
This updates the documentation to reflect the behavior of deflateParams() when it is not able to compress all of the input data provided so far due to insufficient output space. It also assures that data provided is compressed before the parameter changes, even if at the beginning of the stream.
Diffstat (limited to 'deflate.c')
-rw-r--r--deflate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/deflate.c b/deflate.c
index 544521d..daab31a 100644
--- a/deflate.c
+++ b/deflate.c
@@ -509,8 +509,7 @@ int ZEXPORT deflateParams(strm, level, strategy)
}
func = configuration_table[s->level].func;
- if ((strategy != s->strategy || func != configuration_table[level].func) &&
- strm->total_in != 0) {
+ if ((strategy != s->strategy || func != configuration_table[level].func)) {
/* Flush the last buffer: */
err = deflate(strm, Z_BLOCK);
if (err == Z_BUF_ERROR && s->pending == 0)