Skip to main content

encode_container

Function encode_container 

Source
pub fn encode_container(
    header: &Container10dHeader,
    inputs: &[SectionInput<'_>],
    out: &mut [u8],
) -> Result<usize, SectionTableError>
Expand description

Encode a .10d container into a caller-supplied buffer. Zero-heap on the hot path (the only stack arrays are the index order and descriptor table, both fixed-size). Returns the number of bytes written.

The header is written with section_table_offset and section_count filled in to point at the table; header_crc32c is left as the caller supplied it (P0.3 wires the shared CRC-32C over the header).