BrotliEncoder 結構

定義

提供方法與靜態方法,以無串流、不需配置且有效率的方式使用 Brotli 資料格式規格將資料編碼及解碼。

public value class BrotliEncoder : IDisposable
public struct BrotliEncoder : IDisposable
type BrotliEncoder = struct
    interface IDisposable
Public Structure BrotliEncoder
Implements IDisposable
繼承
BrotliEncoder
實作

建構函式

BrotliEncoder(Int32, Int32)

使用指定的品質與視窗初始化 BrotliEncoder 結構的新執行個體。

方法

Compress(ReadOnlySpan<Byte>, Span<Byte>, Int32, Int32, Boolean)

將唯讀位元組範圍壓縮到目的地範圍。

Dispose()

釋出並處置非受控資源。

Flush(Span<Byte>, Int32)

將空的唯讀位元組範圍壓縮到期目的地,這可確保為所有已處理的輸入產生輸出。 當來源已耗盡且目的地有足夠的空間可容納剩餘的資料時,會執行實際排清。

GetMaxCompressedLength(Int32)

取得所提供輸入大小的最大預期壓縮長度。

TryCompress(ReadOnlySpan<Byte>, Span<Byte>, Int32)

嘗試將來源位元組範圍壓縮為目的地範圍。

TryCompress(ReadOnlySpan<Byte>, Span<Byte>, Int32, Int32, Int32)

使用提供的壓縮品質層級與編碼器視窗位元,嘗試將來源位元組範圍壓縮為目的地位元組範圍。

適用於