Op Englesch liesen Editéieren

Deelen iwwer


BrotliEncoder.Compress Method

Definition

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

C#
public System.Buffers.OperationStatus Compress(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock);

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

Produkt Versiounen
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.1