On Jan 17, 2004, at 03:06, Peter Gervai wrote:
inflate()
returns Z_STREAM_END when it gets to the end, not Z_OK. If
you get Z_OK, you have to ask it to run more data, or something...?
Not
entirely sure how to handle that.
See attachment.<c2.pl>
That's definitely cleaner code, thanks!
However it fails on old-59.raw and old-60.raw; both of these are short
files but seem to end with Z_OK rather than Z_STREAM_END...
PHP's gzinflate() works without complaint on both, and the results look
correct.
Here's the uncompressed text:
http://fr.wikipedia.org/w/wiki.phtml?title=Alsace&action=edit&oldid…
http://fr.wikipedia.org/w/wiki.phtml?title=Alsace&action=edit&oldid…
The compressed test set is here:
http://leuksman.com/misc/raw.zip
-- brion vibber (brion @
pobox.com)