Don't need to emit an empty fixed block when changing parameters.
gzsetparams() was using Z_PARTIAL_FLUSH when it could use Z_BLOCK instead. This commit uses Z_BLOCK, which avoids emitting an unnecessary ten bits into the stream.
This commit is contained in:
parent
123f9cfaf7
commit
c5ee34c28a
@ -554,7 +554,7 @@ int ZEXPORT gzsetparams(file, level, strategy)
|
||||
/* change compression parameters for subsequent input */
|
||||
if (state->size) {
|
||||
/* flush previous input with previous parameters before changing */
|
||||
if (strm->avail_in && gz_comp(state, Z_PARTIAL_FLUSH) == -1)
|
||||
if (strm->avail_in && gz_comp(state, Z_BLOCK) == -1)
|
||||
return state->err;
|
||||
deflateParams(strm, level, strategy);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user