Easy.Compression by Nima Ara

<PackageReference Include="Easy.Compression" Version="1.1.0" />

 ICompressor

public interface ICompressor : IDisposable
Specifies the contract that an instance of ICompressor must implement.
using System; using System.IO; using System.Text; namespace Easy.Compression { public interface ICompressor : IDisposable { void Compress(Stream streamIn, Stream compressedOutput, CompressionLevel level = CompressionLevel.Standard); byte[] Compress(byte[] bytes, CompressionLevel level = CompressionLevel.Standard); byte[] Compress(string input, CompressionLevel level = CompressionLevel.Standard); void DeCompress(Stream compressedInput, Stream streamOut); byte[] DeCompress(byte[] bytes); string DeCompressAsString(byte[] bytes); string DeCompressAsString(byte[] bytes, Encoding encoding); } }