From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Zstandard" |
|---|
| claim | "When Content_Checksum_flag is set, 4 bytes follow the last block: the low 32 bits of XXH64 (seed 0) of the frame's decoded content, little-endian. The same value is used per entry by the seekable format's seek table." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Zstandard" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "Content_Checksum_flag (FHD bit 2)" |
|---|
| effect | "checksum = XXH64(content, 0) & 0xFFFFFFFF, stored LE after the last block" |
|---|
| test_vectors | | input | "content '' (empty)" |
|---|
| expected | "XXH64 0xEF46DB3751D8E999, stored 99 E9 D8 51" |
|---|
|
| input | "content 'abc'" |
|---|
| expected | "XXH64 0x44BC2CF5AD770999, stored 99 09 77 AD" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "Content_Checksum: xxh64() of the decoded data with seed zero; low 4 bytes stored little-endian" |
|---|
| repo | "https://github.com/facebook/zstd" |
|---|
| commit | "49cf51799ea051457f57243527aa2058f999f005" |
|---|
| path | "doc/zstd_compression_format.md" |
|---|
| lines | "133-139" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "XXH64 vectors from the pure-Python xxh64 of Code:Zstandard/Zstandard decoder (Python); the same function verifies the checksums of rle-first-block.zst, xml.zst, z000028.zst and 40 dictionary frames." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Content checksum is XXH64 low 32 bits" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T17:12:19.334Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:22:47.023Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read doc/zstd_compression_format.md at 49cf517 lines 133-139 (low 4 bytes of xxh64 seed 0, little endian, only when Content_Checksum_flag) and contrib/seekable_format/zstd_seekable_compression_format.md line 113 (seek table Checksum = least significant 32 bits of XXH64, LE, only when Checksum_Flag set)." |
|---|
|
|
|---|