Variable-length quantity
Encoding method for variable-length integers / From Wikipedia, the free encyclopedia
Dear Wikiwand AI, let's keep it short by simply answering these key questions:
Can you list the top facts and stats about Variable-length quantity?
Summarize this article for a 10 year old
SHOW ALL QUESTIONS
This article is about codes that are a variable number of bytes. For a more general category of variable-bit-length codes, see variable-length code.
A variable-length quantity (VLQ) is a universal code that uses an arbitrary number of binary octets (eight-bit bytes) to represent an arbitrarily large integer. A VLQ is essentially a base-128 representation of an unsigned integer with the addition of the eighth bit to mark continuation of bytes. VLQ is identical to LEB128 except in endianness. See the example below.