Skip to main content

write_varint

Function write_varint 

Source
fn write_varint(out: &mut Vec<u8>, value: u64)
Expand description

Appends an unsigned LEB128 varint.

The same encoding didbot_data::Cid uses inside a CID, written again here rather than shared, because the two are the same shape for unrelated reasons: multiformats chose it for CIDs and CAR chose it for section lengths, and a change to either must not move the other.