From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:LZ4" |
|---|
| claim | "LZ4 blocks must end with a literals-only sequence; the reference encoder keeps the last 5 bytes as literals (LASTLITERALS = 5) and starts the last match at least 12 bytes before the block end (MFLIMIT = 12), so inputs under 13 bytes are stored as literals only. Decoders may reject blocks that break these rules; an empty input is the single token byte 00." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:LZ4" |
|---|
| observed_in | |
|---|
|
|---|
| data | | condition | "end of every LZ4 block" |
|---|
| effect | "last sequence = literals only, at least 5 of them; last match starts >= 12 bytes before the end" |
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "End of block conditions 1-3: last sequence contains only literals; the last 5 bytes are always literals; the last match must start at least 12 bytes before the end of block; empty input = one zero byte" |
|---|
| repo | "https://github.com/lz4/lz4" |
|---|
| commit | "aa787570e681c695fc087b4a44cd2d5b38c2289a" |
|---|
| path | "doc/lz4_Block_format.md" |
|---|
| lines | "113-136" |
|---|
|
| type | "source" |
|---|
| detail | "#define MINMATCH 4, #define LASTLITERALS 5, #define MFLIMIT 12" |
|---|
| repo | "https://github.com/lz4/lz4" |
|---|
| commit | "aa787570e681c695fc087b4a44cd2d5b38c2289a" |
|---|
| path | "lib/lz4.c" |
|---|
| lines | "243-247" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "End of block rules" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T17:53:41.970Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T01:30:48.015Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read lz4/lz4 lib/lz4.c at aa78757 lines 243-247: MINMATCH 4, LASTLITERALS 5, MFLIMIT 12." |
|---|
|
|
|---|