Huffman Class |
Namespace: Algs4Net
public class Huffman
The Huffman type exposes the following members.
Name | Description | |
---|---|---|
![]() | Compress |
Reads a sequence of 8-bit bytes from standard input; compresses them
using Huffman codes with an 8-bit alphabet; and writes the results
to standard output. |
![]() | Expand |
Reads a sequence of bits that represents a Huffman-compressed message from
standard input; expands them; and writes the results to standard output. |
![]() ![]() | MainTest |
Sample client that calls Compress() if the command-line
argument is "-" an Expand() if it is "+". |
For additional documentation, see Section 5.5 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class Huffman implementation by the respective authors.