pub fn encode(
list: &PostingList,
postings_per_block: u16,
block_maxima: &[u8],
) -> Result<EncodedPostings, PostingsError>Expand description
Encodes one posting list in the original version 1 layout.
block_maxima supplies the per-block reserved u8 slot; pass an empty
slice to store zeros. The impact-pair bytes stay zero, which is what
keeps the frozen v1 golden byte-identical.
New writers use encode_v2. This entry point exists so the v1 golden
stays exercised and so a v1 stream can still be produced deliberately.
ยงErrors
Returns PostingsError::ZeroBlockSize when the geometry is degenerate.