Show / Hide Table of Contents

Interface ICompressionUtilityAsync

Useful utility interface for quickly and easily compressing/decompressing data using async/await.

Namespace: GlitchedPolygons.Services.CompressionUtility
Assembly: GlitchedPolygons.Services.CompressionUtility.dll
Syntax
public interface ICompressionUtilityAsync

Methods

| Improve this Doc View Source

Compress(Byte[], CompressionSettings)

Compresses the specified bytes using the provided CompressionSettings.

Declaration
Task<byte[]> Compress(byte[] bytes, CompressionSettings compressionSettings)
Parameters
Type Name Description
System.Byte[] bytes

The byte[] array to compress.

CompressionSettings compressionSettings

The desired compression settings.

Returns
Type Description
Task<System.Byte[]>

The compressed byte[] array.

| Improve this Doc View Source

Compress(String, Encoding)

Compresses the specified string.

Declaration
Task<string> Compress(string text, Encoding encoding = null)
Parameters
Type Name Description
System.String text

The string to compress.

Encoding encoding

The encoding to use. Can be null; UTF8 will be used in that case.

Returns
Type Description
Task<System.String>

The compressed string.

| Improve this Doc View Source

Decompress(Byte[], CompressionSettings)

Decompresses the specified bytes using the CompressionSettings that have been used to originally compress the bytes.

Declaration
Task<byte[]> Decompress(byte[] compressedBytes, CompressionSettings compressionSettings)
Parameters
Type Name Description
System.Byte[] compressedBytes

The compressed byte[] array that you want to decompress.

CompressionSettings compressionSettings

The CompressionSettings that have been used to compress the bytes.

Returns
Type Description
Task<System.Byte[]>

The decompressed bytes[].

| Improve this Doc View Source

Decompress(String, Encoding)

Decompresses the specified compressed string.

Declaration
Task<string> Decompress(string compressedString, Encoding encoding = null)
Parameters
Type Name Description
System.String compressedString

The compressed string to decompress.

Encoding encoding

The encoding to use. Can be null; UTF8 will be used in that case.

Returns
Type Description
Task<System.String>

The decompressed string

  • Improve this Doc
  • View Source
Back to top Generated by DocFX