Skip to main content

build_prefix

Function build_prefix 

Source
pub fn build_prefix(
    config: &[u8],
    flags: u16,
    created_at: u64,
    engine_ver: &str,
    metas: &[SectionMeta],
) -> Prefix
Expand description

Lays out the header, config block and section table from per-section (kind, len, hash) metadata (the streaming writer’s first pass), byte for byte identical to SnapshotWriter::finish’s leading region. The caller then streams each section body followed by pad_len zero bytes, feeding a running Xxh3 the prefix and every body/pad byte, and finally calls SnapshotSink::patch.