Bewerken

Share via


BrotliDecoder.TryDecompress Method

Definition

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

public:
 static bool TryDecompress(ReadOnlySpan<System::Byte> source, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public static bool TryDecompress (ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten);
static member TryDecompress : ReadOnlySpan<byte> * Span<byte> * int -> bool
Public Shared Function TryDecompress (source As ReadOnlySpan(Of Byte), destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

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