2 ms·
Variable length integers could have easily increased the object count limit with only a very small increase in size. VLQ[1] would have been one good choice, but
by wongarsu 10y ago
Variable length integers could have easily increased the object count limit with only a very small increase in size. VLQ[1] would have been one good choice, but various other schemes would have allowed the same size as a one-byte encoding with up to about 250 objects while still allowing larger numbers.
But of course that increases encoder and decoder complexity. For icons, a 255 style/path limit seems reasonable and keeps the code simple.
[1]: https://en.wikipedia.org/wiki/Variable-length_quantity https://en.wikipedia.org/wiki/Variable-length_quantity
- Mindless2112 10y agoPrefixVarint [1] is usually a better choice than VLQ. It's faster to decode and requires the same number of bits. [1] https://news.ycombinator.com/item?id=11263378 https://news.ycombinator.com/item?id=11263378