pub const fn encoded_len(b: u8) -> usize
Expand description
Returns the encoded length in a vu128
prefix byte.
ยงExamples
let mut buf = [0u8; 5];
let encoded_len = vu128::encode_u32(&mut buf, 12345);
assert_eq!(vu128::encoded_len(buf[0]), encoded_len);