Skip to content

Compress Method ​

Definition ​

  • Namespace: JASE.Compression
  • Assembly: JASE.Compression.dll

Overloads ​

NameDescription
byte[] Compress(byte[] bytes, CompressionLevel level = null)Compresses a byte array using GZip and the requsted CompressionLevel (Default: optimal).
byte[] Compress(ReadOnlySpan<byte> bytes, CompressionLevel level = null)Compresses a byte array using GZip and the requsted CompressionLevel (Default: optimal).

byte[] Compress(byte[] bytes, CompressionLevel level = null) ​

csharp
byte[] Compress(byte[] bytes, CompressionLevel level = null)

Compresses a byte array using GZip and the requsted CompressionLevel (Default: optimal).

Parameters ​

NameDescription
bytesThe byte array to compress.
levelThe compression level to use.

Returns ​

The compressed array of bytes.

byte[] Compress(ReadOnlySpan<byte> bytes, CompressionLevel level = null) ​

csharp
byte[] Compress(ReadOnlySpan<byte> bytes, CompressionLevel level = null)

Compresses a byte array using GZip and the requsted CompressionLevel (Default: optimal).

Parameters ​

NameDescription
bytesThe byte array to compress.
levelThe compression level to use.

Returns ​

The compressed array of bytes.