In my tests, Python can parse both Adler-32 and CRC32, while PHP can only do Adler-32. Anyways, I shortened my function: function fixAdler32($data) { static $f; if (!isset($f)) $f = tempnam('/tmp', 'gz_fix'); file_put_contents($f, "\x1f\x8b\x08\x00\x00\x00\x00\x00" . $data); return file_get_contents('compress.zlib://' . $f); } On Nov 7, 2007 7:42 AM, Per Jessen <per@xxxxxxxxxxxx> wrote: > heavyccasey@xxxxxxxxx wrote: > > > They're exactly the same, except of the last 4 bytes. Python > > calculates them differently than PHP. PHP follows the standards, > > Python does not :] > > That is exactly what is so weird - does Python maybe have its own > implementation of the gzip compression algorithm? I would have > thought they both used the same zlib. > > > > /Per Jessen, Zürich > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php