C# Class Stumps.ContentEncoder

A class that encodes and decodes the body of an HTTP request or an HTTP response for a specified HTTP content encoding method.
Exibir arquivo Open project: Cayan-LLC/stumps Class Usage Examples

Public Methods

Method Description
ContentEncoder ( string encodingMethod ) : System

Initializes a new instance of the T:Stumps.ContentEncoder class.

Decode ( byte value ) : byte[]

Decodes the specified value.

Encode ( byte value ) : byte[]

Encodes the specified value.

Private Methods

Method Description
CreateDeflateStream ( Stream stream, ContentEncoderMode mode ) : Stream

Creates a new instance of a deflate stream initialized to the specified mode.

CreateGzipStream ( Stream stream, ContentEncoderMode mode ) : Stream

Creates a new instance of a Gzip stream initialized to the specified mode.

Method Details

ContentEncoder() public method

Initializes a new instance of the T:Stumps.ContentEncoder class.
public ContentEncoder ( string encodingMethod ) : System
encodingMethod string The HTTP encoding method.
return System

Decode() public method

Decodes the specified value.
public Decode ( byte value ) : byte[]
value byte The byte array to decode.
return byte[]

Encode() public method

Encodes the specified value.
public Encode ( byte value ) : byte[]
value byte The byte array to encode.
return byte[]