librdx

“Zipped” integers

A performant TLV-centric variation of variable length integers, aka. “varints”. Varints are necessary as real-world integers tend to be small. Spending the full 8 bytes per integer might be too generous. The fact that protobuf has about ten integer types hints at certain complexity here. While protobuf per se is a TLV format, ints use a separate bit-level LEB128 coding. LEB128 uses a flag bit in each byte. If the flag is 1, there is one more byte; flag 0 means it is the last byte.

ABC is TLV-centric, so there is no need for LEB128. Normally, the length is already mentioned in the TLV header.

All zipints are little-endian.