variety: integer arithmetic codes

[ codec, library, mit ] [ Propose Tags ] [ Report a vulnerability ]

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 a similar interface with a precision parameter at small cost to code length.

The Combinatorics module provides functions to optimally encode and decode (rank and unrank) common combinatorial objects.

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.

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2
Change log CHANGELOG.md
Dependencies base (>=4.17.2 && <4.22), bytestring (>=0.11.5 && <0.13), containers (>=0.6.7 && <0.8), exact-combinatorics (>=0.2.0 && <0.3) [details]
Tested with ghc ==9.4.8, ghc ==9.6.7, ghc ==9.8.4, ghc ==9.10.1, ghc ==9.12.2
License MIT
Author nbos
Maintainer nbos@nbos.ca
Category Codec
Home page https://github.com/nbos/variety
Bug tracker https://github.com/nbos/variety/issues
Source repo head: git clone https://github.com/nbos/variety
Uploaded by nbos at 2025-06-05T16:06:19Z
Distributions
Downloads 7 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2025-06-05 [all 1 reports]