Skip to main content

decode_chunk_u16

Function decode_chunk_u16 

Source
pub fn decode_chunk_u16(
    bytes: &[u8],
    frames: u32,
    height: u32,
    width: u32,
    predictor: Predictor,
) -> Result<Vec<u16>, DecodeError>
Expand description

decode_chunk for a chunk of 16-bit codes: the Zstandard frame holds frames × height × width little-endian u16s in the same order, and the PREVIOUS chain is a modulo-65536 residual along the frame axis. The size limit counts codes, so the frame may decompress to twice MAX_PLANE_LENGTH bytes.