Hacker News new | ask | show | jobs
by pegasuscollins 3111 days ago
You could either stipulate (as you suggested) to always use the smallest width that still fits a number and then prefix with a length byte but that would be wasteful. Ideally something like LEB128 would be used. At any rate, it's not an issue in terms of guaranteeing a bijective mapping.
1 comments

Nice, I didn't know about LEB128.