Modules§
Structs§
- Chunk
Entry - Chunk
File - Borrows the chunk table and IMAGE chunk pixel data from the input buffer.
- Chunk
File Header - File
Header - Flat
Header - Flat
Image - Borrows pixel data from the input buffer; no allocations.
- Flat
Image Input - Image
Chunk - Only raw (
compress = 0) IMAGE chunks are decoded; compressed chunks surface asParseError::UnsupportedCompression. - Image
Chunk Header - Image
Chunk Input
Enums§
- Color
Format - On-disk discriminants are byte-stable once shipped. Naming and byte-order
match
mirui::ColorFormatso reader output is zero-copy on the mirui side. Discriminants are partitioned by family:byte >> 4identifies the family (1 = indexed, 2 = alpha-only, 3 = luma, 4 = RGB565, 5 = RGB888, 6 = 32-bit), leaving the rest of each 16-byte run open for same-family extensions. - Layout
- Mirx
File - Parse
Error
Constants§
- CHUNK_
FILE_ HEADER_ LEN - CHUNK_
TABLE_ ENTRY_ LEN - FILE_
HEADER_ LEN - FLAT_
HEADER_ LEN - MAGIC
- PRIMARY_
FORMAT_ NONE - Sentinel byte stored in the CHUNK header
primary_color_formatslot when the chunk has no fixed pixel format (e.g. a VECTOR chunk). - VERSION_
MAJOR - Reader rejects files whose major differs (cross-major is breaking).
- VERSION_
MINOR - Higher minors are tolerated as long as they only add chunks/fields the reader can skip.
Functions§
- crc32
- encode_
chunk_ generic - Single-chunk file with an arbitrary
chunk_typeand a raw payload. FONT / VECTOR / custom critical chunks all wrap their format-specific header insidepayload. The primary header fields (color_format, width, height, stride) are zeroed because they don’t apply. - encode_
chunk_ image - Emits one raw IMAGE chunk; multi-chunk files need a different writer.
- encode_
flat - parse
- parse_
chunk - parse_
flat - peek_
header - Only validates the common prefix; layout-specific bytes are untouched.