BrotliEncoder BrotliEncoder BrotliEncoder BrotliEncoder Struct

定義

提供方法與靜態方法,以無串流、不需配置且有效率的方式使用 Brotli 資料格式規格將資料編碼及解碼。Provides methods and static methods to encode and decode data in a streamless, non-allocating, and performant manner using the Brotli data format specification.

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

建構函式

BrotliEncoder(Int32, Int32) BrotliEncoder(Int32, Int32) BrotliEncoder(Int32, Int32) BrotliEncoder(Int32, Int32)

使用指定的品質與視窗初始化 BrotliEncoder 結構的新執行個體。Initializes a new instance of the BrotliEncoder structure using the specified quality and window.

方法

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

將唯讀位元組範圍壓縮到目的地範圍。Compresses a read-only byte span into a destination span.

Dispose() Dispose() Dispose() Dispose()

釋出並處置非受控資源。Frees and disposes unmanaged resources.

Flush(Span<Byte>, Int32) Flush(Span<Byte>, Int32) Flush(Span<Byte>, Int32) Flush(Span<Byte>, Int32)

將空的唯讀位元組範圍壓縮到期目的地,這可確保為所有已處理的輸入產生輸出。Compresses an empty read-only span of bytes into its destination, which ensures that output is produced for all the processed input. 當來源已耗盡且目的地有足夠的空間可容納剩餘的資料時,會執行實際排清。An actual flush is performed when the source is depleted and there is enough space in the destination for the remaining data.

GetMaxCompressedLength(Int32) GetMaxCompressedLength(Int32) GetMaxCompressedLength(Int32) GetMaxCompressedLength(Int32)

取得所提供輸入大小的最大預期壓縮長度。Gets the maximum expected compressed length for the provided input size.

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

嘗試將來源位元組範圍壓縮為目的地範圍。Tries to compress a source byte span into a destination span.

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

使用提供的壓縮品質層級與編碼器視窗位元,嘗試將來源位元組範圍壓縮為目的地位元組範圍。Tries to compress a source byte span into a destination byte span, using the provided compression quality leven and encoder window bits.

適用於