f



Can full flushes improve compression?

Hi all,

When using zlib (DEFLATE), do you know cases where using full flushes 
perform better than partial flushes?

I ask because RFC 4978 (IMAP COMPRESS Extension)
   https://tools.ietf.org/html/rfc4978
states:

    A server can improve downstream compression if it hints to the
    compressor that the data type is about to change strongly, e.g., by
    sending a Z_FULL_FLUSH at the start and end of large non-text
    literals

I wonder whether it is really the case.
When using Z_FULL_FLUSH, the sliding dictionary of the previous 32K 
bytes of uncompressed data is wiped clean.  So I am under the impression 
that this will always result in compression that is less effective than 
or equal to doing a Z_PARTIAL_FLUSH.  Having the 32K dictionary from 
previous data, no matter how unrelated, can only help; and if there are 
no matching strings in there, then it is simply not referenced.

Could it be that when using Z_FULL_FLUSH, zlib would start again from 
scratch and therefore use <15 bit offsets for the backquotes, and use 
fewer output bits to adapt to how base64 looks from scratch than with 
10K or more of ASCII text experience?

Have you ever seen that?  (a full flush improving compression)

Thanks beforehand for your comments on that subject.

-- 
Julien ÉLIE

« C'est une liqueur de grain distillée en Calédonie. » (Astérix)
0
UTF
9/11/2016 8:39:00 PM
comp.compression 4696 articles. 0 followers. Post Follow

0 Replies
599 Views

Similar Articles

[PageSpeed] 40

Reply: