Click or drag to resize
LZW Class
The LZW class provides methods for compressing and expanding a binary input using LZW compression over the 8-bit extended ASCII alphabet with 12-bit codewords.
Inheritance Hierarchy
SystemObject
  Algs4NetLZW

Namespace: Algs4Net
Assembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class LZW

The LZW type exposes the following members.

Constructors
  NameDescription
Public methodLZW
Uses file names to direct input and output
Top
Methods
  NameDescription
Public methodCompress
Reads a sequence of 8-bit bytes from standard input; compresses them using LZW compression with 12-bit codewords; and writes the results to standard output.
Public methodExpand
Reads a sequence of bit encoded using LZW compression with 12-bit codewords from standard input; expands them; and writes the results to standard output.
Public methodStatic memberMainTest
Sample client that calls compress() if the command-line argument is "-" an expand() if it is "+".
Top
Remarks

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 LZW implementation by the respective authors.

See Also