Bijou64: A variable-length integer encoding
Bijou64 is a new variable-length integer encoding developed for the Subduction CRDT sync protocol. It was created to address a signature-verification bug and unexpectedly offers improved performance compared to the common LEB128 encoding. The design ensures that each integer has a unique representation, eliminating issues related to canonicality in binary protocols.
- ▪Bijou64 was developed to fix a subtle signature-verification bug in the Subduction CRDT sync protocol.
- ▪It runs faster than the more common LEB128 encoding due to its unique design constraints.
- ▪Bijou64 ensures that each integer can only be represented in one way, preventing issues with canonicality in binary protocols.
Opening excerpt (first ~120 words) tap to expand
April 2026 Brooklyn Zelenka It’s nice when you work on security and accidentally get some performance for free. This is the story of a small encoding called bijou64 — a variable-length integer (varint) encoding that we developed for the Subduction CRDT sync protocol. It was intended to fix a subtle signature-verification bug by making each number only representable a single way. It turned out to also run a few times faster than the more common varint LEB128. That “bijou” is French for “small jewel” is a happy coincidence 💎 We didn’t set out to write a fast varint, but it turns out that our design constraints made for an encoding that has to do less work. The Problem Many binary protocols need a compact way to encode integers that are usually small but occasionally large.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Inkandswitch.