Synchronize less frequently when compressing descriptors

This may improve our compression ratios.

fix for 11787
This commit is contained in:
Nick Mathewson 2014-05-07 10:27:30 -04:00
parent 2e1ac274ab
commit 8ecfcf712c

View File

@ -472,7 +472,7 @@ tor_zlib_process(tor_zlib_state_t *state,
state->stream.avail_out = (unsigned int)*out_len;
if (state->compress) {
err = deflate(&state->stream, finish ? Z_FINISH : Z_SYNC_FLUSH);
err = deflate(&state->stream, finish ? Z_FINISH : Z_NO_FLUSH);
} else {
err = inflate(&state->stream, finish ? Z_FINISH : Z_SYNC_FLUSH);
}