From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:LZFSE" |
|---|
| claim | "LZFSE v1 compressed block header: magic, n_raw_bytes, n_payload_bytes, n_literals, n_matches, n_literal_payload_bytes, n_lmd_payload_bytes, literal_bits, 4 literal states, lmd_bits, l/m/d states, then 20+20+64+256 u16 frequencies (offsets computed from the C field order)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "bvx1 blocks" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "lzfse_compressed_block_header_v1" |
|---|
| size | "772" |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "magic" |
|---|
| notes | "bvx1" |
|---|
|
| offset | "0x4" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "n_raw_bytes" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "n_payload_bytes" |
|---|
|
| offset | "0xC" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "n_literals" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "n_matches" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "n_literal_payload_bytes" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "n_lmd_payload_bytes" |
|---|
|
| offset | "0x1C" |
|---|
| size | 4 |
|---|
| type | "int32_t" |
|---|
| name | "literal_bits" |
|---|
|
| offset | "0x20" |
|---|
| size | 8 |
|---|
| type | "uint16_t[4]" |
|---|
| name | "literal_state" |
|---|
|
| offset | "0x28" |
|---|
| size | 4 |
|---|
| type | "int32_t" |
|---|
| name | "lmd_bits" |
|---|
|
| offset | "0x2C" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "l_state" |
|---|
|
| offset | "0x2E" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "m_state" |
|---|
|
| offset | "0x30" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "d_state" |
|---|
|
| offset | "0x32" |
|---|
| size | 40 |
|---|
| type | "uint16_t[20]" |
|---|
| name | "l_freq" |
|---|
|
| offset | "0x5A" |
|---|
| size | 40 |
|---|
| type | "uint16_t[20]" |
|---|
| name | "m_freq" |
|---|
|
| offset | "0x82" |
|---|
| size | 128 |
|---|
| type | "uint16_t[64]" |
|---|
| name | "d_freq" |
|---|
|
| offset | "0x102" |
|---|
| size | 512 |
|---|
| type | "uint16_t[256]" |
|---|
| name | "literal_freq" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "lzfse_compressed_block_header_v1 struct, plus LZFSE_ENCODE_*_SYMBOLS counts; offsets and the 772 size (770 + 2 tail padding) are my computation, not compiled" |
|---|
| repo | "https://github.com/lzfse/lzfse" |
|---|
| commit | "e634ca58b4821d9f3d560cdc6df5dec02ffc93fd" |
|---|
| path | "src/lzfse_internal.h" |
|---|
| lines | "89-92,291-330" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Block headers" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T01:29:15.070Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:51:54.658Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read lzfse_compressed_block_header_v1 in lzfse e634ca58b482 lzfse_internal.h and the symbol counts (20, 20, 64, 256): summing the members gives 0x32 + 720 = 770 bytes, 772 with the 4-byte alignment padding of the struct; offsets 0x1C, 0x20, 0x28, 0x2C, 0x32, 0x5A, 0x82, 0x102 recomputed and match." |
|---|
| notes | "Only the uncompressed-tables v1 (bvx1) block; bvx2 stores a truncated, compressed-table header." |
|---|
|
|
|---|