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§

Functions§

  • Return the length of the δ code for n using a default value for USE_DELTA_TABLE and USE_GAMMA_TABLE.
  • Return the length of the δ code for n.