Package org.h2.dev.util
Class BinaryArithmeticStream.Huffman
- java.lang.Object
-
- org.h2.dev.util.BinaryArithmeticStream.Huffman
-
- Enclosing class:
- BinaryArithmeticStream
public static class BinaryArithmeticStream.Huffman extends java.lang.ObjectA Huffman code table / tree.
-
-
Constructor Summary
Constructors Constructor Description Huffman(int[] frequencies)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intread(BinaryArithmeticStream.In in)Read a value.voidwrite(BinaryArithmeticStream.Out out, int value)Write a value.
-
-
-
Method Detail
-
write
public void write(BinaryArithmeticStream.Out out, int value) throws java.io.IOException
Write a value.- Parameters:
out- the output streamvalue- 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
-
-