Re: Antwort: [PHP-DEV] transparent output compression patch

From: Date: Mon, 13 Nov 2000 11:40:25 +0000
Subject: Re: Antwort: [PHP-DEV] transparent output compression patch
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-37889@lists.php.net to get a copy of this message
Thank you. It works now. quote from RFC 2068: deflate The "zlib" format defined in RFC 1950[31] in combination with the "deflate" compression mechanism described in RFC 1951[29]. This meens http1.1 coding "deflate" actually includes zlib headers/trailers. So browsers arn't following this RFC (they're expecting only the raw deflate data as described in RFC 1951)?! -Jade. On Mon, Nov 13, 2000 at 10:59:02AM +0100, Marc.Pohl@wwf-koeln.de wrote: > > Hello Jade, > > the deflate coding will fail because of the wrong initializer. In real > there are no differences between gzip and deflate coding, both use the same > algorithm. The difference in your code is, that you use deflateInit2() with > negative WBITS for GZIP and the default deflateInit() for "deflate", which > uses positive WBITS. > > The negative WBITS suppress the generation of the zlib internal headers (2 > leading bytes and 4 bytes trailing adler32 checksum). So if you cut the > first 2 bytes and the last 4 bytes of your "deflate" output, both methods > will have the same output. > > regards > marc > > Marc Pohl > WWF Wort + Ton GmbH > Bereich e-media > > Tel. 0221 6900 112 > Fax. 0221 6900 150 > http://www.wwf-gruppe.de/ > -- =============================================================================== Jade Nicoletti Nicoletti Net Services Tel. 01 240 4774 Geschäftsleitung Postfach 2519 Fax 01 240 4775 System-Administration 8021 Zürich ============================================[ Weitere Infos: http://nns.ch/ ]==

« previous php.dev (#37889) next »