pub fn varint<W: Write>(w: &mut W, v: u64) -> Result<usize>
Expand description
Writes a varint to w
.
Returns the number of bytes written.
varint(n) = [n] if n < 128
[(n & 127) | 128] ++ varint(n >> 7) if n ≥ 128