Interface Codec

All Known Subinterfaces:
PrefixCodec
All Known Implementing Classes:
HuffmanCodec, HuTuckerCodec

public interface Codec
An abstract factory corresponding to an instance of a specific compression technique.

An implementation of this interface provides coders and decoders. The constructors must provide all data that is required to perform coding and decoding.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a coder for the compression technique represented by this coded.
    Returns a decoder for the compression technique represented by this coded.
    int
    Returns the number of symbols handled by this codec.
  • Method Details

    • coder

      Coder coder()
      Returns a coder for the compression technique represented by this coded.
      Returns:
      a coder for the compression technique represented by this codec.
    • decoder

      Decoder decoder()
      Returns a decoder for the compression technique represented by this coded.
      Returns:
      a decoder for the compression technique represented by this codec.
    • size

      int size()
      Returns the number of symbols handled by this codec.
      Returns:
      the number of symbols handled by this codec.