Integer codes (gaps≥1)

(code by Claude, guidance by Georgios Evangelidis)

Type a list of numbers and see how unary, Elias γ and δ, variable byte, group varint and Simple-9 turn them into bits. Click any group of bits, or step through the stream the way a decoder would read it.

A gap in a posting list is never 0, so every value here is at least 1. Codes that could also store 0 (unary, variable byte, group varint, Simple-9) store x − 1 instead, so no codeword is wasted.

Examples:

Choose an encoding