BrotliEncoder.TryCompress 메서드

정의

오버로드

TryCompress(ReadOnlySpan<Byte>, Span<Byte>, Int32)

원본 바이트 범위를 대상 범위로 압축하려고 시도합니다.

TryCompress(ReadOnlySpan<Byte>, Span<Byte>, Int32, Int32, Int32)

제공된 압축 품질 수준 및 인코더 창 비트를 사용하여 원본 바이트 범위를 대상 바이트 범위로 압축하려고 시도합니다.

TryCompress(ReadOnlySpan<Byte>, Span<Byte>, Int32)

Source:
BrotliEncoder.cs
Source:
BrotliEncoder.cs
Source:
BrotliEncoder.cs

원본 바이트 범위를 대상 범위로 압축하려고 시도합니다.

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

매개 변수

source
ReadOnlySpan<Byte>

압축할 원본 데이터를 포함하는 바이트의 읽기 전용 범위입니다.

destination
Span<Byte>

이 메서드가 반환될 때 압축된 데이터가 저장되는 바이트 범위입니다.

bytesWritten
Int32

이 메서드가 반환할 때 destination에 쓴 총 바이트 수입니다.

반환

작업이 성공했으면 true이고, 그렇지 않으면 false입니다.

적용 대상

TryCompress(ReadOnlySpan<Byte>, Span<Byte>, Int32, Int32, Int32)

Source:
BrotliEncoder.cs
Source:
BrotliEncoder.cs
Source:
BrotliEncoder.cs

제공된 압축 품질 수준 및 인코더 창 비트를 사용하여 원본 바이트 범위를 대상 바이트 범위로 압축하려고 시도합니다.

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

매개 변수

source
ReadOnlySpan<Byte>

압축할 원본 데이터를 포함하는 바이트의 읽기 전용 범위입니다.

destination
Span<Byte>

이 메서드가 반환될 때 압축된 데이터가 저장되는 바이트 범위입니다.

bytesWritten
Int32

이 메서드가 반환할 때 destination에 쓴 총 바이트 수입니다.

quality
Int32

Brotli 압축의 품질을 나타내는 숫자입니다. 0은 최소(압축 안 함)이고 최대는 11입니다.

window
Int32

인코더 창 비트를 나타내는 숫자입니다. 최솟값은 10이고 최댓값은 24입니다.

반환

작업이 성공했으면 true이고, 그렇지 않으면 false입니다.

적용 대상