Re: gzuncompress() Not Working.
| From: | heavyccasey at gmail dot com | Date: | Wed, 07 Nov 2007 15:24:55 +0000 |
| Subject: | Re: gzuncompress() Not Working. | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264188@lists.php.net to get a copy of this message | ||
They're exactly the same, except of the last 4 bytes. Python
calculates them differently than PHP. PHP follows the standards,
Python does not :]
This would be more concise if PHP included the gzdecode
(http://us2.php.net/gzdecode) function.
On Nov 7, 2007 12:12 AM, Per Jessen <per@computer.org> wrote:
> heavyccasey@gmail.com wrote:
>
> > The documentation for zlib says that it expects an Adler-32 checksum
> > at the end of the file.
> >
> > PHP follows this [largely outdated] standard.
>
> Uh, nothing to do with PHP, the code is in zlib.
>
> > Python, on the other hand, doesn't, and uses a different checksum,
> > CRC-32.
>
> There's something crooked going here. No-one should have to write up
> work-arounds for weird incompatibilities in the gzip format. The
> problem is - why is Python using an incorrect checksum? And is Python
> not using the zlib library?
>
> http://www.python.org/doc/lib/module-zlib.html
>
> >From this page:
>
> "There are known incompatibilities between the Python module and
> versions of the zlib library earlier than 1.1.3; 1.1.3 has a security
> vulnerability, so we recommend using 1.1.4 or later."
>
> Do you have the right zlib version? Mine is 1.2.3.
>
> If your work-around works, well, fine. Personally I'd dig a little
> deeper. I would positively hate having that kind of crud in my
> production code.
>
>
>
> /Per Jessen, Zürich
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>