Antwort: [PHP-DEV] transparent output compression patch

From: Date: Mon, 13 Nov 2000 09:59:02 +0000
Subject: Antwort: [PHP-DEV] transparent output compression patch
Groups: php.dev 
Request: Send a blank email to php-dev+get-37883@lists.php.net to get a copy of this message
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/

« previous php.dev (#37883) next »