|Subject:||use of Compress::Raw::Lzma::RawDecoder fails with large amount of data|
|Date:||Wed, 24 Jun 2015 04:50:21 -0400|
|To:||bug-Compress-Raw-Lzma [...] rt.cpan.org|
|From:||perl_monkey [...] Safe-mail.net|
I recently discovered a little problem with a script I've developed which uses the Compress::Raw::Lzma::RawEncoder / RawDecoder. Basically, the problem is that when I compress a (very) large buffer it doesn't successfully decompress it. Instead I get the error "Data is corrupted". I'm going to attach a minimal perl script (simplified version of what I am trying to do) that shows how to reproduce this problem. I am not quite sure yet if I am doing something wrong or not, but it seems to work perfectly with smaller input buffers. Furthermore, I did try to find some hints if there are some limits or if that is a known problem (or other users experienced the same issue) but I didn't find much. Also playing around with MemLimit, Bufsize and LimitOutput didn't help at all. To explain the code (attached): when using a small (random) input length to the lzma compression it always work. But after we increase that size/length to about 64k, it most of the time won't work. If it is much larger than 64k it always fails. What I mean by "it doesn't work" is that the perl script isn't able to compress a (huge) random string and later on decompress it to the original string. Can you please help me to understand the problem ?
Message body is not shown because sender requested not to inline it.