C# Class hpack.HuffmanEncoder

Datei anzeigen Open project: ringostarr80/hpack Class Usage Examples

Public Methods

Method Description
Encode ( BinaryWriter output, byte data ) : void

Compresses the input string literal using the Huffman coding.

Encode ( BinaryWriter output, byte data, int off, int len ) : void

Compresses the input string literal using the Huffman coding.

GetEncodedLength ( byte data ) : int

Returns the number of bytes required to Huffman encode the input string literal.

HuffmanEncoder ( int codes, byte lengths ) : System

Creates a new Huffman encoder with the specified Huffman coding.

Method Details

Encode() public method

Compresses the input string literal using the Huffman coding.
if an I/O error occurs.
public Encode ( BinaryWriter output, byte data ) : void
output System.IO.BinaryWriter the output stream for the compressed data
data byte the string literal to be Huffman encoded
return void

Encode() public method

Compresses the input string literal using the Huffman coding.
if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
public Encode ( BinaryWriter output, byte data, int off, int len ) : void
output System.IO.BinaryWriter the output stream for the compressed data
data byte the string literal to be Huffman encoded
off int the start offset in the data
len int the number of bytes to encode
return void

GetEncodedLength() public method

Returns the number of bytes required to Huffman encode the input string literal.
public GetEncodedLength ( byte data ) : int
data byte the string literal to be Huffman encoded
return int

HuffmanEncoder() public method

Creates a new Huffman encoder with the specified Huffman coding.
public HuffmanEncoder ( int codes, byte lengths ) : System
codes int the Huffman codes indexed by symbol
lengths byte the length of each Huffman code
return System