Class Codec.ZeroCodec

java.lang.Object
it.unimi.dsi.sux4j.mph.codec.Codec.ZeroCodec
All Implemented Interfaces:
Codec
Enclosing interface:
Codec

public static class Codec.ZeroCodec extends Object implements Codec
A degenerate stateless codec (always returns zero).
  • Method Details

    • getInstance

      public static Codec.ZeroCodec getInstance()
    • getCoder

      public Codec.ZeroCodec.Coder getCoder(Long2LongMap frequencies)
      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.

      Specified by:
      getCoder in interface Codec
      Parameters:
      frequencies - a map from symbols (longs) to frequencies (longs).
      Returns:
      a coder for the given map.