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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Coder coder()
      Returns a coder for the compression technique represented by this coded.
      Decoder decoder()
      Returns a decoder for the compression technique represented by this coded.
      int size()
      Returns the number of symbols handled by this codec.
    • Method Detail

      • 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.