cz.cuni.jagrlib.piece
Class LZWCodec.LZWTrie

java.lang.Object
  extended by cz.cuni.jagrlib.piece.LZWCodec.LZWTrie
Enclosing class:
LZWCodec

protected class LZWCodec.LZWTrie
extends java.lang.Object

Dictionary implemented by trie-like structure (represented by binary tree - first son is son, second one is brother) each entry holds only one character. Each word in the dictionary is represented by a path from root to its vertex.

Since:
0.24

Field Summary
protected  int actualPos
          Actual index for trie traversal.
protected  int clearDir
          Clear-directory command.
protected  int codeSize
          Actual codeword length in bits.
protected  int endOfData
          End-of-Data command.
protected  boolean eod
          End-of-Data status.
protected  int firstCode
          First free phrase code.
protected  boolean fullCode
          True if code-table is full and is waiting for expansion.
protected  int character
           
protected  int initCodeSize
          Initial code size in bits (for dictionary re-initialization).
protected  int maxCode
          Accelerator: (1 << codeSize) - 1.
protected  int maxSymbol
          Maximal symbol value.
 int NIL
          Void reference value.
protected  int oldCode
           
protected  int[] phrase
          Holds actual phrase.
protected  int phrasePos
          Position in actual phrase.
protected  java.util.ArrayList<cz.cuni.jagrlib.piece.LZWTrieEntry> table
          Internal vocabulary representation (trie).
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NIL

public final int NIL
Void reference value.

See Also:
Constant Field Values

maxSymbol

protected int maxSymbol
Maximal symbol value.


clearDir

protected int clearDir
Clear-directory command. Value should be 256 for 8-bit alphabet.


endOfData

protected int endOfData
End-of-Data command. Value should be 257 for 8-bit alphabet.


firstCode

protected int firstCode
First free phrase code. Value should be 258 for 8-bit alphabet.


table

protected java.util.ArrayList<cz.cuni.jagrlib.piece.LZWTrieEntry> table
Internal vocabulary representation (trie).


actualPos

protected int actualPos
Actual index for trie traversal. (is equal to phrase code)


codeSize

protected int codeSize
Actual codeword length in bits.


initCodeSize

protected int initCodeSize
Initial code size in bits (for dictionary re-initialization).


maxCode

protected int maxCode
Accelerator: (1 << codeSize) - 1.


fullCode

protected boolean fullCode
True if code-table is full and is waiting for expansion.


eod

protected boolean eod
End-of-Data status.


phrase

protected int[] phrase
Holds actual phrase.


phrasePos

protected int phrasePos
Position in actual phrase.


character

protected int character

oldCode

protected int oldCode