Re: zlib and fopen and stream_filter_append, prebuffer read errors help
| From: | Bob Sabiston | Date: | Wed, 12 Dec 2007 21:03:09 +0000 |
| Subject: | Re: zlib and fopen and stream_filter_append, prebuffer read errors help | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265808@lists.php.net to get a copy of this message | ||
On Dec 12, 2007, at 2:31 PM, Richard Lynch wrote:
On Wed, December 12, 2007 11:28 am, Bob Sabiston wrote:How could I do that? I thought the only way to use zlib in PHP was through the stream functions.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...
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