Skip to main content

build_chunks

Function build_chunks 

Source
pub fn build_chunks<'a>(
    offsets: &[i64],
    variables: &[VariableEntry],
    plane: &dyn Fn(i64, u8) -> Result<&'a [u8]>,
    geometry: &TileGeometry,
) -> Result<(Vec<GroupEntry>, Vec<(ChunkEntry, Vec<u8>)>)>
Available on crate feature encoder only.
Expand description

The v2 index tables and uncompressed chunks of one bundle.

plane resolves one (frame offset, variable id) pair to its codes. Every variable shares the file’s one axis and therefore its groups, and the chunks come back in the physical order the spec fixes: group, then tile row-major, then variable. The planes of a group are looked up once and then cut tile by tile, so a bundle borrows each plane once rather than once per tile.