roxen.lists.roxen.general

Subject Author Date
Re: [PATCH 14/17] New module: gzip-on-the-fly Stephen R. van den Berg <srb[at]cuci[dot]nl> 21-01-2009
Arjan van Staalduijnen wrote:
>-----Oorspronkelijk bericht-----
>Van: Martin Jonsson [mailto:<marty[at]roxen.com>] 
>> (To be honest, I don't know if there is any browser 
>> that supports deflate but not gzip so I don't know if "deflate" would 
>> ever be used in reality.)

I've never seen a browser that supports deflate, but not gzip.
In order to simplify the code, I'd suggest supporting gzip only; it also
avoids the royal mess with MicroSoft and deflate.

>I peeked at the Apache module doing on-the-fly compression when I bumped
>into some problems with mine. In the past there was the 3rd party
>mod_gzip module, using gzip compression, but nowadays apache contains a
>mod_deflate module in it's source code for "deflate" compression.
>Comments in that source state they prefer deflate over gzip since it
>uses less cpu (at the cost of slightly less compression). I don't know
>what is truth and what is not at that level.

That is nonsense.  Deflate/zlib/gzip all use the same compression code.
And basically, the difference between the 3 encodings is:
a. MS-deflate is the raw compression stream.
b. Standards-deflate is the same raw compression stream as in (a) with a small
   header and trailer of a few bytes (as produced by zlib).
c. gzip is the standards-deflate format as in (b) with yet another small
   header and trailer of a few bytes.

So gzip is a few bytes extra, but no difference in speed.
-- 
Sincerely,
           Stephen R. van den Berg.

Real programmers don't produce results, they return exit codes.