Using BCJ2_Decode() function in multiple calls

  • Nitin Dalbhide (Symantec)

    Applying BCJ2 filter with the BCJ2_Decode() API needs complete extracted data in process memory. While extracting large 7z files with the help of 32 bit 7zDec tool (that uses 7z C library) fails to allocate required memory block and in turn extraction does not succeed.
    I observed that x86_Convert() API works in multiple calls and small memory chunks can be submitted to it for extracting big 7z files. Is it possible to use BCJ2_Decode() function in the same way (multiple calls)?

    7-Zip version and type (Both - 32-bit / 64-bit)
    Windows version and type - Windows 7 SP1 (64-bit)
    CPU type - Intel Core i5
    RAM size - 4 GB

  • Igor Pavlov

    Igor Pavlov - 2013-12-18

    C version of 7z decoder doesn't implement that feature now.

    Only C++ code in 7-Zip can do it now.
    In C++ code it can work so: you call bcj2 decoder, that bcj2 decoder requests data from three copies of LZMA decoder.

    Note also that 7-Zip itself doesn't use that scheme.
    7-Zip uses multithreading code for 7z decoder, where bcj2 and all lzma decoders work in separate threads and there is data exchange between threads.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks