From 43bfaba3d718a27c1b137b1d1aa90d9427ab4a4f Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sun, 2 Aug 2015 00:02:07 -0700 Subject: 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. --- deflate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'deflate.c') 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) -- cgit v1.2.3-55-g6feb