Module varint

Module varint 

Source
Expand description

Variable-length integer encoding using LEB128 format.

This module provides encoding and decoding of signed 64-bit integers using the LEB128 (Little Endian Base 128) format. Each byte uses 7 bits for data and 1 bit as a continuation flag.

Functionsยง

decode
Decodes a LEB128 VarInt from a byte slice.
encode
Encodes a signed 64-bit integer as LEB128 VarInt.