Skip to content
Snippets Groups Projects
Commit c5ee34c2 authored by Mark Adler's avatar Mark Adler
Browse files

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.
parent 123f9cfa
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment