Expand description
The chunked container.
Layout, all integers little-endian:
header "BREAD\0\r\n" (8 bytes), container version u16
chunk tag [u8; 4], chunk version u16, raw length u64,
stored length u64, CRC-32 of the stored bytes u32,
stored bytes (zstd)
... chunks until the end of the fileThe \r\n in the magic catches a file mangled by a text-mode transfer,
as PNG’s does.
Structs§
- Bread
Reader - Reads a
.breadfile chunk by chunk. - Bread
Writer - Writes a
.breadfile chunk by chunk. - Chunk
- One chunk read back: its tag, version and decompressed payload.
- Chunk
Tag - A chunk’s kind, four ASCII bytes.
Enums§
- Read
Bread Error - Why a
.breadfile could not be read.
Constants§
- CONTAINER_
VERSION - The container layout this build writes and reads.
- MAGIC
- The first bytes of every
.breadfile.