It seems our default argument when compressing with zlib is Z_SYNC_FLUSH. That's not ideal, though: in theory we would get better compression by using Z_NO_FLUSH. But, how much better? And would that work with our code, or would we need other changes?
We should at least investigate this in 0.2.5, though if the fix is nontrivial, it can wait for 0.2.6.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
I still don't know if the patch works. But if it does, I expect it to save something 7% for server descriptors, and who-knows-how-much for microdescs. (This is based on downloading all.z from turtles, uncompressing it, and recompressing it with gzip -9)
I've attached a fun script to try compressing different numbers of descriptors and microdescriptors with and without Z_SYNC_FLUSH.
Preliminary results are that we should expect to save 5-7% when sending 10-40 server descriptors, and between 12-17% when sending 10-100 microdescriptors. Worth doing IMO.
I think Z_SYNC_FLUSH is safe on inflate. After all, there is only one correct output for inflating any compressed zlib stream. (Anybody want to look at the zlib source to see what's up?)