Module dsi_bitstream::codes::gamma

source ·
Expand description

Elias γ code.

The γ code of a natural number n is the concatenation of the unary code of ⌊log₂(n + 1)⌋ and the binary representation of n + 1 with the most significant bit removed.

The USE_TABLE parameter enables or disables the use of pre-computed tables for decoding.

Traits§

Functions§

  • Return the length of the γ code for n using a default value for USE_TABLE.
  • Return the length of the γ code for n.