dyz1990 / sevenz-rust

A 7z decompressor/compressor lib written in pure rust
Apache License 2.0
153 stars 24 forks source link

Feature request BCJ LZMA support #1

Closed georgik closed 1 year ago

georgik commented 2 years ago

Scenario: extract 7z file with Windows binaries

Example archive: https://github.com/niXman/mingw-builds-binaries/releases/download/12.1.0-rt_v10-rev3/x86_64-12.1.0-release-posix-seh-rt_v10-rev3.7z

Error message:

thread 'main' panicked at 'complete: UnsupportedCompressionMethod("[3, 3, 1, 3]")'

A problem caused by binary files which are compressed by BCJ LZMA2:26. Regular files compressed with LZMA2:26 are extracted without problem. Note: Type filter/compression applied to a particular file could be explored by 7-zip File Manager in column Method.

According to my research BCJ is a Branch-Call-Jump (BCJ) filter. It's mentioned here: https://docs.python.org/3/library/lzma.html#specifying-custom-filter-chains

dyz1990 commented 2 years ago

@georgik Thank you for your report. The BCJ support is in progress.

dyz1990 commented 1 year ago

bcj x86 filter is supported now. Other BCJ filter support is in progress