From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:XZ" |
|---|
| claim | "The .xz Stream Footer is 12 bytes: CRC32 of the following 6 bytes, Backward Size (u32 LE; Index size = (value + 1) * 4), a copy of the Stream Flags, and the magic 59 5A. A reader finds the Index from the end of the file with it." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:XZ" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "xz_stream_footer" |
|---|
| size | 12 |
|---|
| fields | | offset | 0 |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "crc32" |
|---|
| notes | "CRC32 of bytes 4-9" |
|---|
|
| offset | 4 |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "backward_size" |
|---|
| notes | "Index size / 4 - 1" |
|---|
|
| offset | 8 |
|---|
| size | 2 |
|---|
| type | "uint8_t[2]" |
|---|
| name | "stream_flags" |
|---|
| notes | "must equal the Stream Header's" |
|---|
|
| offset | 10 |
|---|
| size | 2 |
|---|
| type | "uint8_t[2]" |
|---|
| name | "magic" |
|---|
| notes | "59 5A" |
|---|
|
|
|---|
| test_vectors | | input | "empty input, CRC64 (Index of 8 bytes)" |
|---|
| expected | "1F B6 F3 7D 01 00 00 00 00 04 59 5A" |
|---|
|
| input | "hello, check none" |
|---|
| expected | "06 72 9E 7A 01 00 00 00 00 00 59 5A" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "Sections 2.1.2 to 2.1.2.4" |
|---|
| repo | "https://github.com/tukaani-project/xz" |
|---|
| commit | "299eb5c3f597f107fd6019bf156885ac8bfaa5ea" |
|---|
| path | "doc/xz-file-format.txt" |
|---|
| lines | "391-453" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Footers of the mksamples.py files; mt.xz (5 Blocks) has backward size 32 = stored 7." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Stream Footer" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T16:35:44.431Z" |
|---|
| verifications | |
|---|