VLQencoded
VLQencoded refers to the use of Variable Length Quantity (VLQ) encoding to represent integers with a variable number of bytes. In a VLQ stream, each byte contains seven data bits and a continuation flag in the most significant bit. The continuation flag is set to 1 when another byte follows and cleared to 0 for the final byte. The seven data bits from each byte contribute to the overall value, with the most significant group appearing first.
To encode a value, the number is split into 7-bit chunks. These chunks are arranged in big-endian
Decoding VLQencoded data involves reading bytes until a byte with MSB 0 is encountered, collecting the seven
Applications of VLQencoded data include the MIDI file format, where delta times and other quantities are stored
---