Do you have a question? Post it now! No Registration Necessary. Now with pictures!
December 10, 2007, 4:06 pm
rate this thread
I am trying to decompress some data in a file, from PHP. It's data that
has been zlib-compressed on a handheld device and sent wirelessly to the PHP
I can open the file and read some regular data from it. When I get to the
position where my zlib compressed information starts, I make these calls:
$zlib_filter = stream_filter_append($cellfile, 'zlib.inflate',
$data = fread($cellfile, $thumblength);
Is that the right way to do it? I am getting this error:
Filter failed to process pre-buffered data. Not adding to filterchain.
I put 1 for the compression level, because originally I only compress with
one pass of the zlib.compress function. I hope that it is possible to use
this zlib decompression from some point within a regular file. I do not want
to go the route of compressing my entire file with gzip. I appreciate any
tips on what I might be doing wrong.