Table of Contents

Class GzipCompression

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

A compression algorithm using gzip format to compress the content of an HTTP request.

public class GzipCompression : ICompression
Inheritance
GzipCompression
Implements
Inherited Members

Constructors

GzipCompression()

Creates a compression algorithm using gzip format.

[RequiredMember]
public GzipCompression()

GzipCompression(CompressionLevel)

Creates a compression algorithm using gzip format.

public GzipCompression(CompressionLevel compressionLevel)

Parameters

compressionLevel CompressionLevel

CompressionLevel to use.

Properties

ContentEncodingName

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

public 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.

public 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.