aboutsummaryrefslogtreecommitdiff
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
zlib-43bfaba3d718a27c1b137b1d1aa90d9427ab4a4f.tar.bz2
zlib-43bfaba3d718a27c1b137b1d1aa90d9427ab4a4f.zip
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)
509 } 509 }
510 func = configuration_table[s->level].func; 510 func = configuration_table[s->level].func;
511 511
512 if ((strategy != s->strategy || func != configuration_table[level].func) && 512 if ((strategy != s->strategy || func != configuration_table[level].func)) {
513 strm->total_in != 0) {
514 /* Flush the last buffer: */ 513 /* Flush the last buffer: */
515 err = deflate(strm, Z_BLOCK); 514 err = deflate(strm, Z_BLOCK);
516 if (err == Z_BUF_ERROR && s->pending == 0) 515 if (err == Z_BUF_ERROR && s->pending == 0)