Expand description
Go-compatible varint decoding (binary.PutUvarint / PutVarint).
Prometheus uses Go’s unsigned LEB128 and zig-zag signed varints in both the
index format and chunk bit streams. Error behaviour follows Go’s
binary.Uvarint: overflow and truncation are reported separately.
Constants§
- MAX_
VARINT_ LEN - Maximum bytes a 64-bit varint can occupy.
Functions§
- peek_
uvarint - Reads a varint without advancing
pos, returning (value, next_pos). - uvarint
- Reads an unsigned LEB128 varint, advancing
pos. - uvarint32
- Upper bound for a 32-bit length field (used by index sections).
- varint
- Reads a zig-zag encoded signed varint, advancing
pos.