Am 28.10.11 17:29, Reindl Harald schrieb: > Am 28.10.2011 10:59, schrieb Michael Wallner: >> gzencode in PHP-5.4 behaves differently than in previous versions. >> I outlined the reasoning in the comment from 2009-03-03 22:11 UTC >> at http://bugs.php.net/47178 > as long gzdecode() can decode stored data from previous versions > without destroy the binary this should not be a big deal WHAT? zlib format is not something php made up (more exactly, it's RFC 1950). There's compatibility with other software implementing the algorithm.
The behavior change probably happened on r299980, when it was rewritten: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/ext/zlib/zlib.c?r1=298625&r2=299980 The PHP 5.4 behavior seems more correct, as I can inflate it fine, while on 5.3.8 it fails with "incorrect header check". The old behavior seems explained in http://us.php.net/manual/en/function.gzencode.php#20411 It added a 10-byte gzip header. Given that there's code expecting that (doing a substr(gzencode(), 10)), I think it should be readded again, with maybe a new DEFLATE_NO_GZIP_HEADER option to keep what is now FORCE_DEFLATE (that could also be done through the new zlib_encode, depends how it turns out). -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php