Skip to main content

decode_payload_with_dict

Function decode_payload_with_dict 

Source
pub fn decode_payload_with_dict<'a>(
    encoding: u32,
    bytes: &'a [u8],
    dict: Option<&[u8]>,
) -> Result<Cow<'a, [u8]>>
Expand description

Decode a chunks_canonical payload that MAY be dict-framed (zstd_dict, id 5), supplying the shared dictionary from section 0x0A. all other encodings ignore the dict and route through decode_payload. the dict variant decodes BYTE-IDENTICALLY to the raw chunks_canonical payload, so content_hash and citations are unchanged.