From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:LZ4" |
|---|
| claim | "LZ4 frame checksums are XXH32 with seed 0, stored as uint32 LE: the content checksum (after the EndMark) over all decoded bytes of the frame, block checksums over each block's stored bytes, and the header checksum byte from the descriptor. XXH32('') = 0x02CC5D05 (stored 05 5D CC 02), XXH32('abc') = 0x32D153FF." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:LZ4" |
|---|
| observed_in | |
|---|
|
|---|
| data | | effect | "integrity checks of LZ4 frames" |
|---|
| test_vectors | | input | "'' (empty), seed 0" |
|---|
| expected | "0x02CC5D05" |
|---|
|
| input | "'a', seed 0" |
|---|
| expected | "0x550D7456" |
|---|
|
| input | "'abc', seed 0" |
|---|
| expected | "0x32D153FF" |
|---|
|
| input | "'Nobody inspects the spammish repetition', seed 0" |
|---|
| expected | "0xE2293B2F" |
|---|
|
| input | "'', seed 0x9E3779B1" |
|---|
| expected | "0x36B78AE7" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "Content checksum: xxHash-32 of the original (decoded) data with seed zero; Block checksum: xxHash-32 of the raw (undecoded) data block with seed zero" |
|---|
| repo | "https://github.com/lz4/lz4" |
|---|
| commit | "aa787570e681c695fc087b4a44cd2d5b38c2289a" |
|---|
| path | "doc/lz4_Frame_format.md" |
|---|
| lines | "91-101, 294-305" |
|---|
|
| type | "source" |
|---|
| detail | "PRIME32_1 2654435761, PRIME32_2 2246822519, PRIME32_3 3266489917, PRIME32_4 668265263, PRIME32_5 374761393" |
|---|
| repo | "https://github.com/lz4/lz4" |
|---|
| commit | "aa787570e681c695fc087b4a44cd2d5b38c2289a" |
|---|
| path | "lib/xxhash.c" |
|---|
| lines | "263-267" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "The XXH32 of Code:LZ4/LZ4 codec and frame scanner (Python) gives these values and verifies the content checksums of all reference frames from the C lz4 tool in pierrec/lz4 testdata." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "XXH32 checksums" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T17:53:42.098Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:22:46.675Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read doc/lz4_Frame_format.md at aa78757: content checksum is XXH32 seed 0 over decoded data (after EndMark), block checksum XXH32 seed 0 over the raw undecoded block, 4 bytes little endian, header checksum from descriptor. Did not recompute the test vectors." |
|---|
|
|
|---|