On Dec 12, 2007, at 7:20 PM, Casey wrote:

Try gzuncompress();

Correct me if I'm wrong, but isn't gzuncompress used for 'gzip' files? Although they both use the same compression, gzip is specific to files and has header information not present in straight zlib data. And as I've mentioned, this is a normal file, not compressed -- I'm just trying to read and decompress pieces of data within the file, which according to the documentation is something zlib does.

I assume that most people use these functions for entire files, but surely someone has used it the other way as well?

Thanks for any info.
Bob





On Dec 12, 2007, at 1:03 PM, Bob Sabiston <[EMAIL PROTECTED]> wrote:


On Dec 12, 2007, at 2:31 PM, Richard Lynch wrote:

On Wed, December 12, 2007 11:28 am, Bob Sabiston wrote:
I'm trying to read some zlib-compressed data from a regular binary
file. When I try to attach the zlib compression filter, I am getting an error: something about how the prebuffered data didn't work with
the filter and so the filter wasn't added to the filter chain.


I looked and found a way to turn off buffering for stream *writes*,
but not for stream reads.  Can anyone help with ideas for why this
isn't working?  I posted questions to comp.lang.php and received no
response.

If all else fails, you could just not use the fancy-pants new stream
and filter functions, and just use http://php.net/zlib directly on the
file.
Sorry Richard for the double mail, I didn't have the list cc'd before...

How could I do that? I thought the only way to use zlib in PHP was through the stream functions.



It's also possible your zlib file is just plain corrupt, and neither
will work...

But I am getting the error before I start to read -- it is not a zlib 'file', it is a stretch of data within
an ordinary file that has been compressed with zlib.

Thanks
Bob

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to