7z reader rejects single-byte filter IDs 04–09 listed in DOC/Methods.txt ("Unsupported Method"), while 0A/0B and the long 0303xxxx IDs work
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 43/100
Research direction
Read DOC/Methods.txt alongside CPP/7zip/Compress/BcjRegister.cpp and BranchRegister.cpp to compare the documented IDs with the registered coder IDs. Reproduce with the provided f04.7z steps, then check decoding for IDs 04–09. Done means confirming whether those IDs are intended for .7z and either matching the registrations to that behavior or correcting the documentation.
Written by the indexing model from the issue text.
Description
Environment
- 7-Zip (z) 26.06 (arm64),
ip7z/7zip@d3296e3, macOS 26.4.1 arm64
Description
DOC/Methods.txt says "xz and 7z formats use same ID map." Its "List of defined IDs" contains:
00 - Copy
03 - Delta
04 - BCJ (x86)
05 - PPC (big-endian)
06 - IA64
07 - ARM (little-endian)
08 - ARMT (little-endian)
09 - SPARC
0A - ARM64
0B - RISCV
In a .7z archive, a folder that uses filter ID 0A or 0B decodes correctly. A folder that uses 04, 05, 06, 07, 08 or 09 fails with ERROR: Unsupported Method. The same filters work under their long IDs (03030103 BCJ, 03030205 PPC, 03030401 IA64, 03030501 ARM, 03030701 ARMT, 03030805 SPARC). 7zz i lists BCJ/PPC/IA64/ARM/ARMT/SPARC only under the long IDs.
Steps to reproduce
A 203-byte archive with one 100-byte ASCII file a.txt in a folder [Copy, filter 04] (the BCJ x86 filter leaves this data unchanged):
cat > f04.b64 <<'EOF'
N3q8ryccAAQtnxkmZAAAAAAAAABHAAAAAAAAANfmRydhLnR4dHwxO2EudHh0fDE7YS50eHR8MTthLnR4dHwxO2EudHh0fDE7YS50eHR8MTthLnR4dHwxO2EudHh0fDE7YS50eHR8MTthLnR4dHwxO2EudHh0fDE7YS50eHR8MTthLnR4AQQGAAEJZAAHCwEAAgEEAQAAAQxkZAAICgFOv4J6AAAFARENAGEALgB0AHgAdAAAABQKAQAAgKYhyYnWARUGAQAgAAAAAAA=
EOF
base64 -d < f04.b64 > f04.7z # works with GNU and macOS base64
7zz l -slt f04.7z | grep Method # Method = Copy 04
7zz t f04.7z; echo "rc=$?" # ERROR: Unsupported Method : a.txt rc=2
If the coder ID byte 04 is changed to 0A (ARM64) and the header CRCs are recomputed, 7zz t reports Everything is Ok. The same failure occurs for IDs 05–09, with LZMA2 instead of Copy, for solid and non-solid archives, and when the filter is used as the header coder (the archive then cannot be opened).
Root cause (analysis on d3296e3)
CPP/7zip/Compress/BcjRegister.cpp:15registers BCJ only as0x3030103.CPP/7zip/Compress/BranchRegister.cpp:31-43registers PPC/IA64/ARM/ARMT/SPARC only as0x3030000 + id.- Only ARM64 and RISCV are registered with their single-byte IDs (
BranchRegister.cpp:55-56:0xa,0xb). - The single-byte IDs 04–09 exist only inside the xz handler (
C/Xz.h:14-19,XZ_ID_X86…XZ_ID_SPARC).
Question / suggested resolution
Are IDs 04–09 meant to be valid in .7z archives?
- If yes: register the branch filters under both IDs for decoding.
- If no: state in
Methods.txtthat 04–09 are xz-only, and that.7zuses03030103etc. for these filters, as it does for ARM64/RISCV with0A/0B.
Found with a differential test setup (a model of the documented behavior compared against the real binary) and then checked by hand: every command above was re-run verbatim on the tested build, and the root cause was read in the source. Tested commit: d3296e3 (26.06).
- Dominant language
- C++
- Stars
- 4.6k
- Forks
- 519
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ip7z/7zip
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
area::installer documentation engine::sd enhancement wg::platform-core
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
lemonade-sdk/lemonade#4349 ·
Maintainers usually reply within 1 day
-
Python example: list a model's scenes and their camerasPossibly taken @rudraparmar76 claimed this today. Opendocumentation good first issue python
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
iamahsanmehmood/openskp#796 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tenstorrent/tt-umd#4183 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
odelaneau/GLIMPSE#353 · 1 comment ·
Maintainers usually reply within 4 days