From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:LZMA" |
|---|
| claim | "The 1-byte LZMA2 property (in .xz Filter Flags and 7z) codes the dictionary size as (2 | (b & 1)) << (b / 2 + 11) for b = 0..39 and 0xFFFFFFFF for b = 40; bits 6-7 must be 0 and b > 40 is invalid." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:LZMA" |
|---|
| observed_in | |
|---|
|
|---|
| data | | effect | "dictionary size of an LZMA2 stream" |
|---|
| test_vectors | | input | "0x00" |
|---|
| expected | "4096" |
|---|
|
| input | "0x01" |
|---|
| expected | "6144" |
|---|
|
| input | "0x10" |
|---|
| expected | "1048576" |
|---|
|
| input | "0x16" |
|---|
| expected | "8388608" |
|---|
|
| input | "0x18" |
|---|
| expected | "16777216" |
|---|
|
| input | "0x28" |
|---|
| expected | "4294967295" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "Section 5.3.1 LZMA2, table and C code" |
|---|
| repo | "https://github.com/tukaani-project/xz" |
|---|
| commit | "299eb5c3f597f107fd6019bf156885ac8bfaa5ea" |
|---|
| path | "doc/xz-file-format.txt" |
|---|
| lines | "845-910" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Python lzma presets 1 and 6 write 0x10 and 0x16 and use 1 MiB and 8 MiB dictionaries (lzma._decode_filter_properties(0x21, b'\x16') reports dict_size 8388608)." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "LZMA2 dictionary size byte" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T16:35:45.203Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:22:46.883Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read doc/xz-file-format.txt at 299eb5c section 5.3.1 (lines 845-910): bits 6-7 reserved MUST be zero, bits>40 error, 40 -> UINT32_MAX, else (2|(bits&1)) << (bits/2+11). The '7z' mention is not from the cited file and was not checked." |
|---|
|
|
|---|