VByte Encode
VByte encoding outputs a non-negative integer as variable-length bytes grouped 7 bits at a time, each byte's highest bit acting as the continuation flag; it is used in inverted indexes.
Purpose
It compactly encodes sequences dominated by small integers, such as document ID gaps in inverted indexes.
Mechanism
It is the same 7-bit grouping plus continuation-flag scheme as Varint; small integers (< 128) take only 1 byte.
Use cases
- Inverted index encoding
- Document ID gaps
- Variable-length integer storage