Skip to main content

encode_poster

Function encode_poster 

Source
pub fn encode_poster(
    codes: &[u8],
    grid: &GridInfo,
) -> Result<(Vec<u8>, GridInfo)>
Available on crate feature encoder only.
Expand description

Encode one quantized plane as a small first-frame poster.

The plane is decimated 2x in both axes (row/column 0, 2, 4, … — for the 721-row grid the last row still lands exactly on the south pole), rows are delta-filtered against the previous row (PNG “Up”, uint8 wraparound), and the result is zlib-deflated so the browser can inflate it with the native DecompressionStream("deflate") — no WASM on the poster path.