de.jarnbjo.util.io
Class HuffmanNode
java.lang.Object
de.jarnbjo.util.io.HuffmanNode
public final class HuffmanNode
- extends Object
Representation of a node in a Huffman tree, used to read
Huffman compressed codewords from e.g. a Vorbis stream.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
o0
protected HuffmanNode o0
o1
protected HuffmanNode o1
value
protected Integer value
HuffmanNode
public HuffmanNode()
- creates a new Huffman tree root node
HuffmanNode
protected HuffmanNode(HuffmanNode parent)
HuffmanNode
protected HuffmanNode(HuffmanNode parent,
int value)
read
protected int read(BitInputStream bis)
throws IOException
- Throws:
IOException
get0
protected HuffmanNode get0()
get1
protected HuffmanNode get1()
getValue
protected Integer getValue()
getDepth
protected int getDepth()
setNewValue
public boolean setNewValue(int depth,
int value)
- creates a new tree node at the first free location at the given
depth, and assigns the value to it
- Parameters:
depth - the tree depth of the new node (codeword length in bits)value - the node's new value
Copyright © 2007-2011
shredzone.org. All Rights Reserved.