From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Brotli" |
|---|
| claim | "An uncompressed meta-block is the header bits ISLAST = 0, MNIBBLES, MLEN - 1 (4-6 nibbles), ISUNCOMPRESSED = 1, then zero padding to the byte boundary and MLEN raw bytes; since a last meta-block cannot be uncompressed, the stream needs an extra empty last block (bits 1, 1, i.e. a final byte 03 when it starts on a byte boundary)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Brotli" |
|---|
| observed_in | |
|---|
|
|---|
| data | | test_vectors | | input | "0B 00 80 58 03" |
|---|
| expected | "X" |
|---|
|
| input | "0B 02 80 58 79 7A 7A 79 03" |
|---|
| expected | "Xyzzy" |
|---|
|
| input | "0B 15 80 54 68 65 20 71 75 69 63 6B 20 62 72 6F 77 6E 20 66 6F 78 20 6A 75 6D 70 73 20 6F 76 65 72 20 74 68 65 20 6C 61 7A 79 20 64 6F 67 03" |
|---|
| expected | "The quick brown fox jumps over the lazy dog" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "DecodeMetaBlockLength: ISUNCOMPRESSED is read only when !is_last_metablock" |
|---|
| repo | "https://github.com/google/brotli" |
|---|
| commit | "86ee1f65f62d6272345dee751d49e7d1f01c2b11" |
|---|
| path | "c/dec/decode.c" |
|---|
| lines | "237-310" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "tests/testdata x.compressed, xyzzy.compressed and quickfox.compressed (the three vectors) decode to their originals with the Python decoder" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Uncompressed meta-block layout" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T19:01:47.272Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:29:00.119Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read DecodeMetaBlockLength in c/dec/decode.c at 86ee1f6 (lines 237-320): ISLAST bit, ISLASTEMPTY bit, MNIBBLES+4 nibbles (3 = metadata), MLEN-1 nibbles, ISUNCOMPRESSED bit read only when not last (so a last meta-block cannot be uncompressed)." |
|---|
|
|
|---|