Class GZipUtilityAsync
Compression utility class for gzipping data asynchronously. Implements the ICompressionUtility interface.
Implements
Inherited Members
Namespace: GlitchedPolygons.Services.CompressionUtility
Assembly: GlitchedPolygons.Services.CompressionUtility.dll
Syntax
public class GZipUtilityAsync : ICompressionUtilityAsync
Methods
Compress(byte[], CompressionSettings)
Compresses the specified bytes using GZipStream and the provided CompressionSettings.
Declaration
public Task<byte[]> Compress(byte[] bytes, CompressionSettings compressionSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | bytes | The |
| CompressionSettings | compressionSettings | The desired CompressionSettings. |
Returns
| Type | Description |
|---|---|
| Task<byte[]> | The gzipped |
See Also
Compress(string, Encoding)
Compresses ("gee-zips") the specified string using GZipStream and default CompressionSettings.
Declaration
public Task<string> Compress(string text, Encoding encoding = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The |
| Encoding | encoding | The encoding to use. Can be |
Returns
| Type | Description |
|---|---|
| Task<string> | The gzipped |
See Also
Decompress(byte[], CompressionSettings)
Decompresses the specified bytes using GZipStream and the CompressionSettings that have been used to originally compress the bytes.
Declaration
public Task<byte[]> Decompress(byte[] gzippedBytes, CompressionSettings compressionSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | gzippedBytes | The gzipped |
| CompressionSettings | compressionSettings | The CompressionSettings that have been used to compress the bytes. |
Returns
| Type | Description |
|---|---|
| Task<byte[]> | The decompressed |
See Also
Decompress(string, Encoding)
Decompresses the specified gzipped string using the default CompressionSettings.
Declaration
public Task<string> Decompress(string gzippedString, Encoding encoding = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | gzippedString | The compressed |
| Encoding | encoding | The encoding to use. Can be |
Returns
| Type | Description |
|---|---|
| Task<string> | The decompressed |