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 Object
A Huffman code table / tree.

## Constructor Summary

Constructors
Constructor
Description
`Huffman(int[] frequencies)`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### Huffman

public Huffman(int[] frequencies)

## Method Details

### write

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

Parameters:
  `out` - the output stream
  `value` - the value to write
Throws:
  `IOException`

### read

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

Parameters:
  `in` - the input stream
Returns:
  the value
Throws:
  `IOException`