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

Compressor

public abstract class Compressor : Algorithm, IDisposable
Represents base class for compression algorithm implementation
protected bool IsActive { get; protected set; }

Gets or sets a value indicating whether compression is active.

protected Session Session { get; }

Gets the session.

protected Compressor()

Initializes a new instance of the Compressor class.

public virtual byte[] Compress(byte[] data)

Compresses the specified data.

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

Compresses the specified data.

public virtual byte[] Decompress(byte[] data)

Decompresses the specified data.

public virtual byte[] Decompress(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