BrotliDecoder.TryDecompress Method

Definition

Attempts to decompress data that was compressed with the Brotli algorithm.

public static bool TryDecompress (ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten);

Parameters

source
ReadOnlySpan<Byte>

A buffer containing the compressed data.

destination
Span<Byte>

When this method returns, a byte span containing the decompressed data.

bytesWritten
Int32

The total number of bytes that were written in the destination.

Returns

true on success; false otherwise.

Remarks

If this method returns false, destination may be empty or contain partially decompressed data, with bytesWritten being zero or greater than zero but less than the expected total.

Applies to

Product Versions
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.1