Closed dridi closed 1 week ago
I have not been able to make all of our use cases work in Varnish Cache without poking at the deflate state
I had this one on my mind and I eventually realized that I may not be able to get the GZIP level at the end of the compression process, but I can definitely get it at the beginning. So I changed my patch to reflect that in the deflateUsed()
documentation.
I suppose I'll need to try compressing my corpus again with different compression levels including zero to be sure.
See https://github.com/madler/zlib/issues/189#issuecomment-2205172650 and https://github.com/varnishcache/varnish-cache/pull/3873#issuecomment-2205637791
With
deflateUsed()
as it currently stands, I have not been able to make all of our use cases work in Varnish Cache without poking at the deflate state. With this patch I can reliably collect the last bit position of the last deflate block in a GZIP stream, as far as our somewhat extensive test suite goes.It also matched the last bit position collected by the fork we currently rely on with a corpus of more than 170000 files.