pub const fn decode_u64(input: [u8; 10]) -> Option<(u64, usize)>
Expand description
Decodes an unsigned LEB128 number.
If there is a valid encoded value, returns the decoded value and the index after the last byte read.
If the encoding is incorrect, returns None
.
If the size in bits of the returned type is less than the size of the value in bits, returns None
.
For instance, if 33 bits are being decoded, then the returned type must be at least a u64
.