Skip to main content
Inspiring
November 18, 2012
Question

Decompressing LZMA .zip files always gives "System out of Memory" on AIR.

  • November 18, 2012
  • 1 reply
  • 1307 views

AIR is supposed to support LZMA compression in addition to Deflate, but it has an error every time I try to use it. ZIPs using the Deflate method decompress just fine.

aByteArray.uncompress("lzma");

Should decompress the LZMA compressed data, but always just has a #1000 System is Out of Memory error.

I have tried skipping the standard header in the zip that should be 2 bytes version info, extra properties length (n) and a filed of the length of n;

Even when I do that, the same thing happens. I have tried deducting the LZMA header length from the general compressed data size in the ZIP header as well and that makes no difference. I am also above AIR 3.3 so that should not be the issue. I also tried setting a small 'library size' when compressing. LZMA is supposed to be "suited for embedded applications" so mobile devices should surly be able to handle it.

The header with the 13 byte header i believe is only for certain stand alone LZMA formats, so that should not apply.

What am I doing wrong? How do I make it work?

This topic has been closed for replies.

1 reply

Inspiring
November 22, 2012

Have you tried fzip for unzipping files? I've got a 50 meg zip file that contains about 11,000 files and it is able to decompress and save the files on android in about 40 seconds.

http://codeazur.com.br/lab/fzip/

FLAdudeAuthor
Inspiring
November 23, 2012

No. I try and avoid cluttering my apps with extra libraries if at all possible. It may have a sizeable footprint when I only need a few things, and it might contain encryption stuff if it supports the whole zip specification, which makes your app banned from export to some countries apparently.

I already have my app doing what I need it to do with the most common deflate method, but it simply would be a shame to not have LZMA support when it is built right into AIR. I would like to know what I'm doing wrong when I call uncompress with "lzma".