build_sparse_preamble

Function build_sparse_preamble 

Source
pub fn build_sparse_preamble(
    content: &[u8],
    lookup: impl Fn(u32) -> Option<(usize, usize)>,
    closure_roots: &[u32],
    record_roots: &[u32],
) -> Vec<u8> ⓘ
Expand description

Build the preamble every sparse worker starts from: the bytes before the first DATA record (the HEADER, which declares the schema), the closure roots with every record they reference, and the records roots alone, all in file order. lookup resolves an id to its span in content.