Browse Source

Synchronize less frequently when compressing descriptors

This may improve our compression ratios.

fix for 11787
Nick Mathewson 10 years ago
parent
commit
8ecfcf712c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/common/torgzip.c

+ 1 - 1
src/common/torgzip.c

@@ -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);
   }