@hackage variety0.1.0.0

integer arithmetic codes

The Variety module provides functions to optimally encode and decode sequences of value-base pairs assuming uniform probability.

If codes get too large and slow to process, Variety.Bounded provides similar interface with a precision parameter at small cost to code length.

The Combinatorics module provides functions to optimally encode and decode common combinatorial objects through ranking and unranking.

The Elias module provides entirely non-parametric encoding and decoding of positive integers. The usual definition doesn't allow for an encoding of 0, so a mapping is baked into the functions in Elias.Natural that shifts the number line by 1.