public class Huff extends java.lang.Object implements None, PostMortem
| Modifier and Type | Field and Description |
|---|---|
static int |
education
The number of characters to process before generation is no longer done.
|
| Constructor and Description |
|---|
Huff(int domain)
Construct a Huffman encoder/decoder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
generate()
Generate the encoding/decoding table.
|
boolean |
postMortem(PostMortem pm)
Compare two Huffman tables.
|
int |
read(BitReader bitreader)
Read bits until a symbol can be identified.
|
void |
tick(int value)
Increase the weight associated with a value by 1.
|
void |
write(int value,
BitWriter bitwriter)
Write the bits corresponding to a symbol.
|
public static final int education
public Huff(int domain)
domain - The number of values known to the object.public void generate()
public boolean postMortem(PostMortem pm)
postMortem in interface PostMortempm - Another object of the same type.public int read(BitReader bitreader) throws JSONException
bitreader - The source of bits.JSONExceptionpublic void tick(int value)
value - The number of the symbol to tickpublic void write(int value,
BitWriter bitwriter)
throws JSONException
value - The number of the symbol to writebitwriter - The destination of the bits.JSONException