Re: httpbis and deflate compression...

On 03/25/2010 09:08 PM, David Morris wrote:
> If someone could provide sniff like rules I could apply to deflate
> content, if I find any, to determine which variation it is

zlib-wrapped-deflate has a small header, but there are no magic numbers
in it so there's not a lot to sniff. (The lower 3 bits of the first byte
are always 0x8 though...) Raw deflate data has no header at all and so
can look more or less like anything (including a valid zlib header). The
only way to actually tell which kind of deflate it is is to try decoding
it, and see if you get a "data is corrupt" error, and if so, that means
it was the other kind and you should try again. (At least, that's how
Firefox does it.)

-- Dan

Received on Friday, 26 March 2010 03:37:41 UTC