Skip to main content

Module varint

Module varint 

Source
Expand description

LEB128 varints and zigzag signed integers.

Functionsยง

len_u64
Bytes write_u64 uses for v.
read_i64
read_u64
Read an unsigned LEB128 varint and advance bytes past it. None when it is truncated or longer than 10 bytes.
write_i64
Append a signed integer as a zigzag varint (small magnitudes are short).
write_u64
Append v as an unsigned LEB128 varint (1 to 10 bytes).