Table of Contents

Interface ICompression

Namespace
Homa.Sdk.Foundation
Assembly
Homa.Sdk.Foundation.dll

A compression algorithm that can be used to compress the content of an HTTP request.

public interface ICompression

Properties

ContentEncodingName

Name of the compression algorithm added to the Content-Encoding header of the HTTP request.

string ContentEncodingName { get; }

Property Value

string

Methods

CreateCompressionStream(Stream)

Creates a compression stream. Used to compress data from another stream and written to the outputStream.

Stream CreateCompressionStream(Stream outputStream)

Parameters

outputStream Stream

Stream the compressed data will be written to.

Returns

Stream

A compression stream.

Examples

new GZipStream(outputStream, CompressionLevel.Fastest, true);

Remarks

The output stream MUST remain OPEN when the compression stream closes.

See Also

SetCompression<TCompression>()