pub fn size<T: TryInto<u64>>(value: T) -> usize
Calculates the number of bytes needed to encode a value as a varint