Module codecs

Source
Expand description

§Codecs Module

This module provides implementations of various variable-length codes, such as minimal binary, gamma, delta, Exp‑Golomb, Zeta, Rice, and their parameterized variants. These codecs facilitate encoding and decoding unsigned 64-bit integers at the bit level, parameterized by an endianness marker and custom bit read/write implementations.

§Codecs Overview

Refer to the codes module of dsi-bitstream for more information on their implementation.

Structs§

DeltaCodec
DeltaCodec: no extra runtime parameter.
ExpGolombCodec
Exp‑Golomb Codec: requires a runtime parameter (e.g. k).
GammaCodec
GammaCodec: no extra runtime parameter.
MinimalBinaryCodec
MinimalBinaryCodec: uses an upper bound as a runtime parameter.
ParamDeltaCodec
ParamDeltaCodec: uses compile‑time booleans for table usage.
ParamGammaCodec
ParamGammaCodec: uses a compile‑time flag for table usage in gamma coding. For more information refer to the Gamma module.
ParamZetaCodec
ParamZetaCodec: uses a compile‑time flag for ζ functions.
RiceCodec
RiceCodec: uses the Rice functions with a runtime parameter (log2_b).
ZetaCodec
ZetaCodec: uses runtime parameter (k) with non‑parametric ζ functions.

Traits§

Codec
Trait for encoding and decoding values using a variable-length code.