Class HuffmanFilter

  • All Implemented Interfaces:
    RecordFilter

    public class HuffmanFilter
    extends java.lang.Object
    implements RecordFilter
    A filter to automatically compress and decompress database records using the Huffman algorithm.
    See Also:
    Huffman, RecordFilter
    • Constructor Summary

      Constructors 
      Constructor Description
      HuffmanFilter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object filterDecode​(java.lang.Object target)
      Decompresses the target object using the Huffman algorithm.
      java.lang.Object filterEncode​(java.lang.Object target)
      Compresses the target object using the Huffman algorithm.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HuffmanFilter

        public HuffmanFilter()
    • Method Detail

      • filterEncode

        public java.lang.Object filterEncode​(java.lang.Object target)
        Compresses the target object using the Huffman algorithm.
        Specified by:
        filterEncode in interface RecordFilter
        Parameters:
        target - object to be compressed
        Returns:
        compressed form of target
      • filterDecode

        public java.lang.Object filterDecode​(java.lang.Object target)
        Decompresses the target object using the Huffman algorithm.
        Specified by:
        filterDecode in interface RecordFilter
        Parameters:
        target - object to be decompressed
        Returns:
        decompressed form of target