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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user