Expand description
Variable-length integer encoding utilities.
Two encodings are used:
- Little-endian (low bits first): linetable
- Big-endian (high bits first): exception tables
Both use 6-bit chunks with 0x40 as the continuation bit.
Functionsยง
- read_
varint - Read a big-endian varint (no start marker).
- read_
varint_ with_ start - Read a big-endian varint with start marker (0x80).
- write_
signed_ varint - Write a little-endian signed varint.
- write_
varint - Write a little-endian varint (used by linetable).
- write_
varint_ be - Write a big-endian varint (used by exception tables).
- write_
varint_ with_ start - Write a big-endian varint with the start marker (0x80) on the first byte.