sam.io
Class Huffman16

java.lang.Object
  |
  +--sam.io.Node
        |
        +--sam.io.Huffman
              |
              +--sam.io.Huffman16

public class Huffman16
extends Huffman


Nested Class Summary
 
Nested classes inherited from class sam.io.Huffman
Huffman.Leaf, Huffman.LeafInputStream, Huffman.LeafOutputStream
 
Constructor Summary
Huffman16()
          Creates a new well-balanced Huffman tree.
 
Method Summary
 java.io.InputStream input(java.io.InputStream delegee)
          Stream for decoding 16 bits huffman-encoded data
 java.io.OutputStream output(java.io.OutputStream delegee)
          Stream for encoding 16 bits huffman-encoded data
 
Methods inherited from class sam.io.Huffman
get, isLeaf, longestPath, main, numberOfLeaves, numberOfNodes, ordered, ratio, reset, shortestPath, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Huffman16

public Huffman16()
Creates a new well-balanced Huffman tree. Default granularity is 1.

Method Detail

input

public java.io.InputStream input(java.io.InputStream delegee)
Stream for decoding 16 bits huffman-encoded data

Specified by:
input in class Huffman
Parameters:
delegee - the 16 bits stream to decode from

output

public java.io.OutputStream output(java.io.OutputStream delegee)
Stream for encoding 16 bits huffman-encoded data

Specified by:
output in class Huffman
Parameters:
delegee - the 16 bits stream to encode to