Package it.unimi.dsi.sux4j.mph.codec
Class Codec.Gamma
java.lang.Object
it.unimi.dsi.sux4j.mph.codec.Codec.Gamma
- All Implemented Interfaces:
Codec
- Enclosing interface:
- Codec
A codec based on Elias's γ code (starting at zero).
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.unimi.dsi.sux4j.mph.codec.Codec
Codec.Binary, Codec.Decoder, Codec.Gamma, Codec.Huffman, Codec.Unary, Codec.ZeroCodec
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCoder
(Long2LongMap frequencies) Returns a coder for a specific map from symbols to frequencies.
-
Constructor Details
-
Gamma
public Gamma()
-
-
Method Details
-
getCoder
Description copied from interface:Codec
Returns a coder for a specific map from symbols to frequencies.Note that even instantaneous codes (such as
Codec.Unary
) need to know the set of symbols, as the returned coder needs to known the maximum codeword length.
-