Found a BUG in ANSI-C LZMA Decoder

liyinhui
2012-09-12
2012-12-07
  • liyinhui
    liyinhui
    2012-09-12

    When I use lzma920/C/Util/7z/7zmain test   in ipad1  to decompression a bit large  bigger 7z  file   , I found equipment memory burstmemory    What method can be solved?

     
  • liyinhui
    liyinhui
    2012-09-12

    Program collapse place in this FOR cycle inside
    static SRes SzDecodeLzma(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inStream,
       Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain)
    {
    。。。
    for (;;)
    。。。
    }
    I'm sorry my English is very poor

     
  • Igor Pavlov
    Igor Pavlov
    2012-09-12

    Please write more details.
    What archive do you decompress (size, number of files, amd so on).
    Did you make any changes in source code?

     
  • liyinhui
    liyinhui
    2012-09-12

    It is a file of 200M basic inside is JPG and BMP files, compressed into 7z format is 4.4 M. Then I use 7zmian  to decompression  this  4.4M file  。In the emulator , ipad2,  ipad3 can decompressed 。Only in ipad1 cannot decompression。
    I don't have altered code !  

     
  • liyinhui
    liyinhui
    2012-09-12

    I can be sure that is ipad1 memory on the burst ! What should I change ANSI - C LZMA  let big 7z files can be in ipad1 on decompression  ? thank you!

     
  • Igor Pavlov
    Igor Pavlov
    2012-09-12

    ANSI-C LZMA Decoder allocates whole solid block in RAM for decompression.

    If you compress files for these 7z files, don't use solid copmression or use small solid block size.

     
  • liyinhui
    liyinhui
    2012-09-13

    don't use solid copmression or use small solid block size ?  What should I do and how to modify  the ANSI-C LZMA  code?  thank you!

     
  • Igor Pavlov
    Igor Pavlov
    2012-09-13

    You can't change ANSI-C LZMA decoder code.
    But if you compress these 7z files, you can change compression settings, so ANSI-C LZMA decoder code will work.
    If you don't control archive creating, you can't change anything. In that case you must use C++ code from p7zip instead.

     
  • liyinhui
    liyinhui
    2012-09-13

    change compression settings ?Where is it set up? Can you tell me the location of the specific Settings  In the code ?

     
  • Igor Pavlov
    Igor Pavlov
    2012-09-13

    You can change compression settings from command line:
    1) default settings:
    7z a archive1.7z *.JPG *.BMP
    you need BIG ram amount to decompress archive1.7z with ANSI-C LZMA Decoder

    2) changed settings (with solid mode off)
    7z a archive2.7z *.JPG *.BMP -ms-
    So probably you will be able to decompress archive2.7z in iPad1 with small RAM size.

     
  • liyinhui
    liyinhui
    2012-09-13

    7z decompression of the command line  help  in ANSI-C LZMA  is this :
    "Usage: 7zDec <command> <archive_name>\n\n"
          "<Commands>\n"
          "  e: Extract files from archive (without using directory names)\n"
          "  l: List contents of archive\n"
          "  t: Test integrity of archive\n"
          "  x: eXtract files with full paths\n"
    Didn't you say that the command line format ?  Thank you for your answer

     
  • Igor Pavlov
    Igor Pavlov
    2012-09-13

    I mean full 7z.exe from 7-Zip for Windows.

     
  • liyinhui
    liyinhui
    2012-09-13

    Oh  。。My goodness !!!