public class LZWTreeNode extends Object
| Modifier and Type | Field and Description |
|---|---|
protected LZWTreeNode[] |
children
List of up to 256 children.
|
protected int |
theCode
Code corresponding to this node.
|
| Constructor and Description |
|---|
LZWTreeNode(int code)
Constructs a new LZW symbol tree node.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(int index,
LZWTreeNode node)
Sets this node's indexth child to match the given node.
|
void |
addTableEntry(ByteVector string,
int code)
Adds the given code for the specified byte sequence.
|
int |
codeFromString(ByteVector string)
Gets the code for the given byte sequence, or -1 if none.
|
LZWTreeNode |
getChild(byte index)
Gets this node's indexth child.
|
int |
getCode()
Gets the code corresponding to this node.
|
void |
initialize()
Initializes this node as the root of the symbol table.
|
LZWTreeNode |
nodeFromString(ByteVector string)
Gets the node for the given byte sequence, or null if none.
|
protected LZWTreeNode[] children
protected int theCode
public void initialize()
public int getCode()
public LZWTreeNode getChild(byte index)
public void addChild(int index,
LZWTreeNode node)
public int codeFromString(ByteVector string)
public LZWTreeNode nodeFromString(ByteVector string)
public void addTableEntry(ByteVector string, int code)