C# Class hpack.HuffmanEncoder

Afficher le fichier Open project: ringostarr80/hpack Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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
Résultat void

Encode() public méthode

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
Résultat void

GetEncodedLength() public méthode

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
Résultat int

HuffmanEncoder() public méthode

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
Résultat System