Another variable-length integer encoding (2021) 62 points by fanf2·841 days ago·dcreager.net·Show in HN
The scheme proposed in this blog post is also called PrefixVarInt.
Signed integers can be represented with either zigzag encoding or sign extension.
For the most common one-byte encoding, zigzag encoding is a worse scheme.https://maskray.me/blog/2024-03-09-a-compact-relocation-form...
My blog post is about a relocation format. I investigated a few schemes and concluded that LEB128 is the best for my use case.
There are multiple reasons including super simple implementation: