Skip to main content

Module varint

Module varint 

Source
Expand description

LP4-ext varint per spec §4.1.

Encoding: [L: 4 bits][payload: L bits], with L=15 reserved as a continuation marker. When L=15: [L_high: 4 bits][payload_low: 14 bits] [payload_high: L_high bits], total payload bits = L_high + 14.

Functions§

read_varint
Decode an LP4-ext varint from reader.
write_varint
Encode value as an LP4-ext varint into writer.