[Zlib-devel] Re: Inflate 1.2.beta0 available for testing

Paul Marquess Paul.Marquess at btinternet.com
Tue Nov 26 12:40:01 EST 2002


> On Monday, November 25, 2002, at 03:49  PM, Mark Adler wrote:
> > It provides these enticing improvements:
>
> I forgot one:
>
> - Automatically decompresses zlib or gzip streams depending on the
> first two bytes of the stream.
>
> I did that because we have received, I don't know, hundreds of emails
> asking: "zlib gives a data error for this perfectly good gzip file.
> Why is that?"  So after explaining hundreds of times that zlib and gzip
> are different formats, I figured I might have a happier, more
> fulfilling life if I rigged inflate to simply deal with gzip files.
>
> There is a #define that disables gzip decoding, in order to avoid
> linking in the crc-32 code for applications that don't need it.

The automatic detection of gzip files reminds me of an issue I encountered
recently while doing some work on the compression/decompression code for a
HTTP Proxy server.

This is what the HTTP spec says about deflate Content coding:

   deflate
        The "zlib" format defined in RFC 1950 [31] in combination with
        the "deflate" compression mechanism described in RFC 1951 [29].

In practice I've found that a lot of browsers don't implement that
correctly - they will only accept RFC1951 content without the enclosing
RFC1950 envelope - that was true of both IE & Netscape. The only browser I
could find that implemented it correctly was Opera, and it could handle it
either way.

Where you aware of this?

Paul

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com




More information about the Zlib-devel mailing list