Module dsi_bitstream::codes::delta
source · Expand description
Elias δ code.
The δ code of a natural number n is the concatenation of the γ
code of ⌊log₂(n + 1)⌋ and the binary representation of n + 1 with the
most significant bit removed.
The USE_DELTA_TABLE parameter enables or disables the use of
pre-computed tables for decoding δ codes, and the USE_GAMMA_TABLE parameter
enables or disables the use of pre-computed tables for decoding the
the initial γ code in case the whole δ code could not be decoded
by tables.
Traits§
- Trait for reading δ codes.
- Parametric trait for reading δ codes.
- Trait for writing δ codes.
- Parametric trait for writing δ codes.
Functions§
- Return the length of the δ code for
nusing a default value forUSE_DELTA_TABLEandUSE_GAMMA_TABLE. - Return the length of the δ code for
n.