Menu

SDK LZMA 4.43 for Java : OutOfMemoryError

Help
2007-01-11
2012-12-07
  • Nobody/Anonymous

    Hello,

    I am trying to use your SDK LZMA 4.43 for Java so as to un7zip an archive. When I launche LzmaAlone, i get an OutOfMemoryError.
    So I read the code of the main contained in LzmaAlone.java. It seems that it reads the 5 first bytes of the archive, then concatenates these bytes which give a number (665828474, same number for two different 7z examples) and then creates a 665828474 sized byte array! This is obviously a too big number and the OutOfMemoryError is thrown.

    Can you help me?

    Best regards,
    Cyril Nguyen

     
    • Nobody/Anonymous

      LZMA is only a compressor/decompressor used in the 7z archive format to compress data and headers !
      (like deflate is only a compressor/decompressor used in the zip archive format)

      If you want to extract files from a 7z archive, you should look at J7zip :
      http://sourceforge.net/project/showfiles.php?group_id=111810&package_id=214282

       

Log in to post a comment.