|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectHuffmanCode
public class HuffmanCode
Driver to create Huffman codes and encoded strings.
| Constructor Summary | |
|---|---|
HuffmanCode(java.lang.String initialString)
Establish this Huffman code based on an initial string. |
|
| Method Summary | |
|---|---|
java.lang.String |
decode(java.lang.String encoded)
Decode a string using this Huffman code. |
java.lang.String |
encode(java.lang.String cleartext)
Encode a string using this Huffman code. |
java.util.Map<java.lang.Character,java.lang.String> |
getCodeMap()
Retrieve the internal Huffman Code Map. |
HNode |
getCodeTree()
Retrieve the internal Huffman Code Tree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HuffmanCode(java.lang.String initialString)
initialString - the initial string used to create the code| Method Detail |
|---|
public java.lang.String encode(java.lang.String cleartext)
cleartext - the string to encode
public java.lang.String decode(java.lang.String encoded)
encoded - the string to decode
public java.util.Map<java.lang.Character,java.lang.String> getCodeMap()
public HNode getCodeTree()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||