Class HuffmanEncoder
Inherited Members
Namespace: Titanium.Web.Proxy.Http2.Hpack
Assembly: Titanium.Web.Proxy.dll
Syntax
public class HuffmanEncoderFields
| Improve this Doc View SourceInstance
Huffman Encoder
Declaration
public static readonly HuffmanEncoder InstanceField Value
| Type | Description | 
|---|---|
| HuffmanEncoder | 
Methods
| Improve this Doc View SourceEncode(BinaryWriter, Byte[])
Compresses the input string literal using the Huffman coding.
Declaration
public void Encode(BinaryWriter output, byte[] data)Parameters
| Type | Name | Description | 
|---|---|---|
| BinaryWriter | output | the output stream for the compressed data | 
| Byte[] | data | the string literal to be Huffman encoded | 
Exceptions
| Type | Condition | 
|---|---|
| IOException | if an I/O error occurs. | 
Encode(BinaryWriter, Byte[], Int32, Int32)
Compresses the input string literal using the Huffman coding.
Declaration
public void Encode(BinaryWriter output, byte[] data, int off, int len)Parameters
| Type | Name | Description | 
|---|---|---|
| BinaryWriter | output | the output stream for the compressed data | 
| Byte[] | data | the string literal to be Huffman encoded | 
| Int32 | off | the start offset in the data | 
| Int32 | len | the number of bytes to encode | 
Exceptions
| Type | Condition | 
|---|---|
| IOException | if an I/O error occurs. In particular, an may be thrown if the output stream has been closed. | 
GetEncodedLength(Byte[])
Returns the number of bytes required to Huffman encode the input string literal.
Declaration
public int GetEncodedLength(byte[] data)Parameters
| Type | Name | Description | 
|---|---|---|
| Byte[] | data | the string literal to be Huffman encoded | 
Returns
| Type | Description | 
|---|---|
| Int32 | the number of bytes required to Huffman encode  |