Hello,
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
server.
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_a ppend($cellfile , 'zlib.inflate',
STREAM_FILTER_R EAD, 1);
$data = fread($cellfile , $thumblength);
stream_filter_r emove($zlib_fil ter);
Is that the right way to do it? I am getting this error:
stream_filter_a ppend() [<a
href='function. stream-filter-append'>functio n.stream-filter-append</a>]:
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.
Thanks,
B