pub fn decode_u64(buf: &[u8; 9]) -> (u64, usize)
Expand description
Decodes a u64
from a buffer, returning the value and encoded length.
ยงExamples
let mut buf = [0u8; 9];
let encoded_len = vu128::encode_u64(&mut buf, 123);
assert_eq!(vu128::decode_u64(&buf), (123, encoded_len));