Varint
The varint module implements the unsigned varint spec.
Functionality is provided by the encode and decode functions, converting between non-negative int values and the corresponding varint bytes:
>>> from multiformats import varint
>>> varint.encode(128)
b'\x80\x01'
>>> varint.decode(b'\x80\x01')
128