LEB128 or Little Endian Base 128 is a variable-length code compression used to store arbitrarily large integers in a small number of bytes.
LEB128 is used in the DWARF debug file format[1][2] and the WebAssembly binary encoding for all integer literals.
[3] As an example, here is how the unsigned number 624485 gets encoded: Unsigned LEB128 and VLQ (variable-length quantity) both compress any given integer into not only the same number of bits, but exactly the same bits—the two formats differ only in exactly how those bits are arranged.
For example, the signed number -123456 is encoded as 0xC0 0xBB 0x78: A straightforward scalar implementation of LEB128 decoding is fairly slow, even more so on modern hardware where branch misprediction is relatively expensive.
The "Vectorized VByte Decoding" paper[4] presented "Masked VByte", which demonstrated speeds of 650–2700 million integers per second on commodity Haswell hardware, depending on encoding density.