<PackageReference Include="SSH.NET" Version="2024.1.0" />

Compressor

public abstract class Compressor : Algorithm, IDisposable
Represents base class for compression algorithm implementation.
protected Compressor(bool delayedCompression)

Initializes a new instance of the Compressor class.

public byte[] Compress(byte[] data)

Compresses the specified data.

public virtual byte[] Compress(byte[] data, int offset, int length)

Compresses the specified data.

protected abstract byte[] CompressCore(byte[] data, int offset, int length)

Compresses the specified data.

public byte[] Decompress(byte[] data)

Decompresses the specified data.

public virtual byte[] Decompress(byte[] data, int offset, int length)

Decompresses the specified data.

protected abstract byte[] DecompressCore(byte[] data, int offset, int length)

Decompresses the specified data.

public void Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

protected virtual void Dispose(bool disposing)

Releases unmanaged and - optionally - managed resources.

public virtual void Init(Session session)

Initializes the algorithm.