[PHP-DEV] Antwort: [PHP-DEV] transparent output compression patch From: Marc.Pohl <email protected>
Date: 11/13/00

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/

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>