C# Класс hpack.HuffmanEncoder

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

Encode() публичный Метод

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
Результат void

Encode() публичный Метод

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
Результат void

GetEncodedLength() публичный Метод

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
Результат int

HuffmanEncoder() публичный Метод

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
Результат System