Buffer error in TDecompressionStream when decompressing some data without deflate header
Original Reporter info from Mantis: arkinform
-
Reporter name:
Original Reporter info from Mantis: arkinform
- Reporter name:
Description:
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.
Steps to reproduce:
I 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.
Mantis conversion info:
- Mantis ID: 26827
- OS: Windows 7
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 31953 (#8751e8bb)
- Monitored by: » dpethes (Dávid Pethes)
- Target version: 3.1.1