[fpc-devel] Buffer error in TDecompressionStream when decompressing some data without deflate header
Архипов Владимир
arkinform at gmail.com
Mon Oct 13 10:42:25 CEST 2014
Hello,
I need to use decompression without deflate header.
I use TCompressionStream and TDecompressionStream with
Askipheader=True like in zipper.pp
And I get buffer error on some strings only when compile code in FPC.
I tried to read from TDecompressionStream exactly like in zipper.pp
unit but I got the same error.
The similar code in Delphi XE2 works fine with any data (windowBits = -15)
The similar code with Askipheader=False works fine in FPC and Delphi.
I have noticed that the problem occurs when in string there are many
duplicated letters.
I registered the issue http://bugs.freepascal.org/view.php?id=26827
where attached example project ziptest.dpr which can be compiled in
FPC and Delphi.
SimpleZipTest('zdeafalatasddfas') - works!
SimpleZipTest('lalalalalalalala') - does not work! buffer error!
In Delphi XE2 both strings compressed and decompressed without errors.
--
Regards,
Vladimir Arkhipov
arkinform at gmail.com
More information about the fpc-devel
mailing list