Redigeeri

Jagamisviis:


BrotliEncoder.Compress Method

Definition

Compresses a read-only byte span into a destination span.

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

Parameters

source
ReadOnlySpan<Byte>

A read-only span of bytes containing the source data to compress.

destination
Span<Byte>

When this method returns, a byte span where the compressed is stored.

bytesConsumed
Int32

When this method returns, the total number of bytes that were read from source.

bytesWritten
Int32

When this method returns, the total number of bytes that were written to destination.

isFinalBlock
Boolean

true to finalize the internal stream, which prevents adding more input data when this method returns; false to allow the encoder to postpone the production of output until it has processed enough input.

Returns

One of the enumeration values that describes the status with which the span-based operation finished.

Applies to