BrotliEncoder.Compress 方法

定義

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

public:
 System::Buffers::OperationStatus Compress(ReadOnlySpan<System::Byte> source, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesConsumed, [Runtime::InteropServices::Out] int % bytesWritten, bool isFinalBlock);
public System.Buffers.OperationStatus Compress (ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock);
member this.Compress : ReadOnlySpan<byte> * Span<byte> * int * int * bool -> System.Buffers.OperationStatus
Public Function Compress (source As ReadOnlySpan(Of Byte), destination As Span(Of Byte), ByRef bytesConsumed As Integer, ByRef bytesWritten As Integer, isFinalBlock As Boolean) As OperationStatus

參數

source
ReadOnlySpan<Byte>

包含要壓縮之資料的唯讀位元組範圍。

destination
Span<Byte>

當此方法傳回時,儲存已壓縮項目的位元組範圍。

bytesConsumed
Int32

當此方法傳回時,從 source 讀取的位元組總數。

bytesWritten
Int32

當此方法傳回時,寫入到 destination 的位元組總數。

isFinalBlock
Boolean

true 以完成內部串流,這會防止在此方法傳回時新增更多輸入資料;false 以允許編碼器延遲輸出的產生,直到它已處理足夠的輸入。

傳回

其中一個列舉值,它描述範圍型作業完成狀態。

適用於