3 ms·
Flexible Varint/VLQ: Variable-length bytewise integer encodings in Go
- bugfix-66 4y agoAnd the decoder: https://bugfix-66.com/1efa93a5eb0cc12b3de7cd1dab8e471a2cc95e1c0059c5054d3ffcfae5b2d762 https://bugfix-66.com/1efa93a5eb0cc12b3de7cd1dab8e471a2cc95e... This is a generalization (and improvement on!) the typical "high-bit" varint encoding, which is simply an specialization with base 128 (used in git, for example). See https://en.m.wikipedia.org/wiki/Variable-length_quantity https://en.m.wikipedia.org/wiki/Variable-length_quantity