[fpc-devel] Buffer error in TDecompressionStream when decompressing some data without deflate header
Marco van de Voort
marcov at stack.nl
Mon Oct 13 11:08:41 CEST 2014
In our previous episode, ??????? ???????? said:
>
> SimpleZipTest('zdeafalatasddfas') - works!
> SimpleZipTest('lalalalalalalala') - does not work! buffer error!
>
> In Delphi XE2 both strings compressed and decompressed without errors.
I quickly checked the bugreport last week and had the following conclusions:
1. the compressed stream is the same. So the problem is in the
decompression.
2. Probably the first string doesn't compress, so it is stored instead of
deflated, so that is pretty normal.
3. I checked in the paszlib source and skipheader does the same as windows
bits, but it seems that it was meant to work for both large and small window
sizes, while -15 is the value for large windowsizes (small buffers are useful on
embedded, but the origins are in 16-bit dos/win3.x systems).
The code looks roughly sane, but it isn't clear where exactly the error
shows. I haven't really debugged in detail.
More information about the fpc-devel
mailing list