Expand description
The container: 32-byte file header, 32-byte chunk descriptors, the directory
at the end of the file, and the 8-byte trailer ([spec/02-file-structure.md]).
Structs§
- Chunk
Descriptor - One 32-byte chunk directory entry.
- Chunk
Type - A four-byte chunk type tag.
- Directory
- The chunk directory: one descriptor per chunk, in file order.
- File
Header - The fixed 32-byte file header at offset 0.
Constants§
- CHUNK_
DESCRIPTOR_ SIZE - Size of one chunk descriptor.
- CHUNK_
FLAG_ ENCRYPTED - Chunk descriptor bit 4: this payload is sealed.
- FILE_
HEADER_ RESERVED_ MASK - Bits a conforming v1 writer must leave clear: 0, 2, 4 and 5-31.
- FILE_
HEADER_ SIZE - Size of the fixed file header at offset 0.
- FLAG_
ENCRYPTED header.flagsbit 3: anAUTHchunk is present and content chunks are sealed.- FLAG_
MULTI_ SECTOR header.flagsbit 1: the file uses sector-based layer encoding.- MAGIC
- File magic,
LUMN. - TRAILER_
MAGIC - Trailer magic,
LEND. - TRAILER_
SIZE - Size of the directory trailer.
Functions§
- crc32c
- CRC-32C (Castagnoli) as the container and the
LTBL/trailer use it. - first_
chunk_ type - The chunk type of the first chunk, or
Noneif the directory is all null. - parse_
directory - Parse the chunk directory.
- parse_
trailer - Read and verify the directory trailer, returning its CRC-32C.
- verify_
trailer_ crc - Verify the trailer CRC-32C covers every preceding byte.