3 ms·
It can be considered a variation on LEB128 that packs all of the continuation bits into the first byte. Ie, two leading ones set in the first byte mean that th
by brandmeyer 7y ago
It can be considered a variation on LEB128 that packs all of the continuation bits into the first byte.
Ie, two leading ones set in the first byte mean that there are two trailing bytes.
https://news.ycombinator.com/item?id=11263378 https://news.ycombinator.com/item?id=11263378 is one description.
https://github.com/stoklund/varint https://github.com/stoklund/varint has some benchmarks.
- IshKebab 7y agoAh ok I understand. Might be a little awkward to implement in Javascript given its lack of 64-bit ints, etc, although it does at least have CLZ32!