Module section

Module section 

Source
Expand description

The low-level module for accessing sections in a DwarFS archive.

A DwarFS archive consists of several sections. Sections for storing raw file data are also called blocks. Each section consists of a Header and maybe-compressed section payload bytes. The maximum uncompressed payload length of each data section is the block-size, which is by default 16MiB. Other non-block sections may be smaller or larger, but should still be small enough to store in memory.

See SectionReader for APIs to read sections. In general, functions returning section headers will always validate the DwarFS version marked in the header is supported, and functions returning section payloads will always validate the fast XXH3 checksum against the header before return.

See also: DwarFS File System Format v2.5

Structsยง

CompressAlgo
Compression algorithm used for section payloads.
Error
An error raised from reading, validating, or decompressiong sections.
Header
The section (aka. block) header.
MagicVersion
Section magic and format version.
SectionIndexEntry
An entry in the section index.
SectionReader
The wrapper type for reading sections from a random access reader.
SectionType
The type of a section.