]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Synchronize less frequently when compressing descriptors
authorNick Mathewson <nickm@torproject.org>
Wed, 7 May 2014 14:27:30 +0000 (10:27 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 7 May 2014 14:27:52 +0000 (10:27 -0400)
This may improve our compression ratios.

fix for 11787

src/common/torgzip.c

index 15451ee30d0ca34e6a6441d4987a9f1af8b14623..239cab9cac1553f68b8c51a3316ef0fee4dabfc2 100644 (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);
   }