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