[Lazarus] RE : Decompressing zip stream

Ludo Brands ludo.brands at free.fr
Fri Sep 2 21:39:47 CEST 2011


> 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:
> 

Tdecompressionstream decompresses in chunks using an outputbuffer with the
size you specify in TInflater.Create. When this size is too small to
decompress a chunk you get an "buffer error". I suggest you try with a
bigger buffersize for small files, instead of lInStream.Size. Wav files have
a high compression ratio so a small input gives a large output. 

Ludo





More information about the Lazarus mailing list