Easy.Compression by Nima Ara

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

 LZ4Compressor

public sealed class LZ4Compressor : ICompressor, IDisposable
An abstraction to easily compress and decompress using the LZ4 and the LZ4HC algorithm.

.

public LZ4Compressor()

Create an instance of the LZ4Compressor.

public void Compress(Stream streamIn, Stream compressedOutput, CompressionLevel level = 0)

Compresses the given streamIn and copies the result to compressedOutput.

public byte[] Compress(byte[] bytes, CompressionLevel level = 0)

Compresses the given bytes with the level.

public byte[] Compress(string input, CompressionLevel level = 0)

Compresses the given input with the level.

public void DeCompress(Stream compressedInput, Stream streamOut)

Decompresses the given compressedInput and copies the result to streamOut.

public byte[] DeCompress(byte[] bytes)

DeCompresses the given bytes.

public string DeCompressAsString(byte[] bytes)

DeCompresses the given bytes as String.

public string DeCompressAsString(byte[] bytes, Encoding encoding)

DeCompresses the given bytes as String.

public void Dispose()

Releases all the resources used by this instance.