Appearance
Compress Method
Definition
- Namespace:
JASE.Compression - Assembly:
JASE.Compression.dll
Overloads
| Name | Description |
|---|---|
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
| Name | Description |
|---|---|
bytes | The byte array to compress. |
level | The 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
| Name | Description |
|---|---|
bytes | The byte array to compress. |
level | The compression level to use. |
Returns
The compressed array of bytes.