Content-Encoding: deflate - is this zlib file format?

I'm writing a filtering web proxy (see sig) and I'm having trouble with
'Content-Encoding: deflate' compressed data.  I need to decompress it to
check the content.

When it says 'Content-Encoding: gzip', I can just read from the socket as
if I were reading a gzip file from the filesystem and pass it through the
gzip decompression included in zlib.

The zlib library decompresses zlib files from memory, so I read in the
data after the header into memory.  Then I use inflateInit(), then inflate()
etc on the data, but zlib does not like the format.

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

To me this says that the data after the header is in zlib file format, and
that the zlib format is using the deflate compression method.  This is the
only one that zlib currently supports anyway.  But zlib does not like the
format.  So what format is it in?

I've saved the data to file to look at it incase anyone needs a copy.  Its
from the web server here:
http://winscp.vse.cz/eng/

I've spent ages checking the code, googling, researching, and found nothing.
I've even found it hard to find anywhere that might have the information.
So this mailing list is my last hope.

Any more questions, let me know.  I also hope this is the right place to
ask this.

Thanks.

-- 
Daniel Barron
(Visit http://dansguardian.org/ - True web content filtering for all)

Received on Friday, 7 September 2001 18:19:09 UTC