Class for encoding strings or byte arrays with Huffman encoding.
More...
|
class | Leaf |
| Container for Leafs and Nodes within the Huffman Tree
|
|
|
| Huffman () |
| Constructor – Nothing added to Frequency Table
|
|
| Huffman (byte[] bInput) |
| Constructor – byte[] added to Frequency Table
|
|
| Huffman (string sInput) |
|
void | Add (byte b) |
| Adds a Byte to the Frequency Table
|
|
void | Add (string s) |
| Adds a String to the Frequency Table
|
|
void | Clear () |
| Clears data entered for encoding
|
|
byte[] | Decode (byte[] bInput) |
|
void | Dispose () |
|
byte[] | Encode (out string OutputLog) |
| Applies Huffman Encoding to the data entered
|
|
byte[] | Encode () |
| Applies Huffman Encoding to the data entered
|
|
|
bool | BuildTree () |
| Takes Frequency Value and Establishes Parent/Child relationship with Tree Nodes & Leafs
|
|
bool | EncodeTree () |
| Walks up the tree from each Leaf, encoding as it goes.
|
|
void | Init () |
| Populate the Leaf Table (Frequency Table), the Leafs will be turned into Nodes
|
|
|
List< Leaf > | HuffmanTree = new List<Leaf>() |
|
StringBuilder | Log = new StringBuilder() |
|
bool | LogEnabled = false |
|
MemoryStream | msInputbytes = new MemoryStream() |
|
Class for encoding strings or byte arrays with Huffman encoding.
- Author
- Eric Nusbaum (eric@.nosp@m.enus.nosp@m.baum..nosp@m.com)
- Since
- 1.0
- Date
- 05/22/2009
Constructor – Nothing added to Frequency Table
Constructor – byte[] added to Frequency Table
- Parameters
-
Adds a Byte to the Frequency Table
- Parameters
-
Adds a String to the Frequency Table
- Parameters
-
Takes Frequency Value and Establishes Parent/Child relationship with Tree Nodes & Leafs
- Returns
Clears data entered for encoding
byte [] Encode |
( |
out string |
OutputLog | ) |
|
Applies Huffman Encoding to the data entered
- Parameters
-
OutputLog | string – Log of Encoding, which returns the Huffman Tree Information |
- Returns
- byte[] – byte[] containing the encoded data package
Applies Huffman Encoding to the data entered
- Returns
- byte[] – byte[] containing the encoded data package
Walks up the tree from each Leaf, encoding as it goes.
- Returns
Populate the Leaf Table (Frequency Table), the Leafs will be turned into Nodes
The documentation for this class was generated from the following file:
- /Users/aron/Unity/AstarPathfindingGIT/Assets/AstarPathfindingProject/Generators/Utilities/Huffman.cs