pub fn decode(bytes: &[u8]) -> Result<(usize, usize)>Expand description
Decode a length_field from the front of bytes.
Returns (length_value, header_len) where header_len is the number of
bytes the length_field itself occupied (so the body starts at
bytes[header_len..]).