org.h2.dev.util
Class BinaryArithmeticStream.Huffman

java.lang.Object
  extended by org.h2.dev.util.BinaryArithmeticStream.Huffman
Enclosing class:
BinaryArithmeticStream

public static class BinaryArithmeticStream.Huffman
extends java.lang.Object

A Huffman code table / tree.


Constructor Summary
BinaryArithmeticStream.Huffman(int[] frequencies)
           
 
Method Summary
 int read(BinaryArithmeticStream.In in)
          Read a value.
 void write(BinaryArithmeticStream.Out out, int value)
          Write a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryArithmeticStream.Huffman

public BinaryArithmeticStream.Huffman(int[] frequencies)
Method Detail

write

public void write(BinaryArithmeticStream.Out out,
                  int value)
           throws java.io.IOException
Write a value.

Parameters:
out - the output stream
value - the value to write
Throws:
java.io.IOException

read

public int read(BinaryArithmeticStream.In in)
         throws java.io.IOException
Read a value.

Parameters:
in - the input stream
Returns:
the value
Throws:
java.io.IOException