[Lazarus] Decompressing zip stream
Leonardo M. Ramé
l.rame at griensu.com
Sat Sep 3 20:08:29 CEST 2011
On 2011-09-03 08:36:43 +0200, Hans-Peter Diettrich wrote:
> Leonardo M. Ramé schrieb:
>
> >While trying to decompress the streams using TInflater class from zipper unit
> >using this code, I get "buffer error" message when calling DeCompress
> >method. I must add that the error only happens with a group of streams,
> >specially with the small ones:
> >
> >var
> > lUnzip: TInflater;
> > lInStream: TMemoryStream;
> > lOutStream: TMemoryStream;
>
> I'd use TFileStream here, at least for the output stream. This should reduce
> buffer size problems.
>
> DoDi
>
I did a quick test using TFileStream, and indeed, it is a little better
than TMemoryStream, but it also raises the "buffer error" message.
Using TFileStream, at least I can see that *part of* the file was decompressed.
--
Leonardo M. Ramé
http://leonardorame.blogspot.com
More information about the Lazarus
mailing list