Skip to main content

decode_int

Function decode_int 

pub fn decode_int(src: &mut &[u8], prefix_bits: u8) -> Result<u64, PrefixError>
Available on crate features http and std only.
Expand description

Decode a prefixed integer with an prefix_bits-bit prefix from src, consuming the bytes it uses (RFC 9204 §4.1.1). High bits of the first byte above the prefix are ignored — a caller reads any representation flags from the first byte before calling this.