Table of Contents

Interface IContentDecoder

Namespace
Fluxzy
Assembly
Fluxzy.Core.dll

Decodes an HTTP content-encoding that the .NET runtime cannot handle natively. gzip, deflate and brotli are decoded by Fluxzy out of the box; any other encoding (e.g. compress/LZW or zstd) requires a decoder to be registered through ContentDecoderRegistry.

public interface IContentDecoder

Examples

Using a delegate:

ContentDecoderRegistry.Register("zstd", compressed => new MyZstdDecodeStream(compressed));

Properties

EncodingToken

The content-encoding token this decoder handles, lowercase (e.g. "zstd", "compress").

string EncodingToken { get; }

Property Value

string

Methods

GetDecodedStream(Stream)

Wraps a compressed input stream and returns a stream yielding the decoded bytes.

Stream GetDecodedStream(Stream compressed)

Parameters

compressed Stream

The raw, still-encoded stream.

Returns

Stream

A readable stream producing the decoded content.