Class Compressor
- Namespace
- Renci.SshNet.Compression
- Assembly
- Renci.SshNet.dll
Represents base class for compression algorithm implementation.
public abstract class Compressor : Algorithm, IDisposable
- Inheritance
-
Compressor
- Implements
- Inherited Members
Constructors
Compressor(bool)
Initializes a new instance of the Compressor class.
protected Compressor(bool delayedCompression)
Parameters
delayedCompression
boolfalse to start compression after receiving SSH_MSG_NEWKEYS. true to delay compression util receiving SSH_MSG_USERAUTH_SUCCESS. https://www.openssh.com/txt/draft-miller-secsh-compression-delayed-00.txt.
Methods
Compress(byte[])
Compresses the specified data.
public byte[] Compress(byte[] data)
Parameters
data
byte[]Data to compress.
Returns
- byte[]
The compressed data.
Compress(byte[], int, int)
Compresses the specified data.
public virtual byte[] Compress(byte[] data, int offset, int length)
Parameters
data
byte[]Data to compress.
offset
intThe zero-based byte offset in
data
at which to begin reading the data to compress.length
intThe number of bytes to be compressed.
Returns
- byte[]
The compressed data.
CompressCore(byte[], int, int)
Compresses the specified data.
protected abstract byte[] CompressCore(byte[] data, int offset, int length)
Parameters
data
byte[]Data to compress.
offset
intThe zero-based byte offset in
data
at which to begin reading the data to compress.length
intThe number of bytes to be compressed.
Returns
- byte[]
The compressed data.
Decompress(byte[])
Decompresses the specified data.
public byte[] Decompress(byte[] data)
Parameters
data
byte[]Compressed data.
Returns
- byte[]
The decompressed data.
Decompress(byte[], int, int)
Decompresses the specified data.
public virtual byte[] Decompress(byte[] data, int offset, int length)
Parameters
data
byte[]Compressed data.
offset
intThe zero-based byte offset in
data
at which to begin reading the data to decompress.length
intThe number of bytes to be read from the compressed data.
Returns
- byte[]
The decompressed data.
DecompressCore(byte[], int, int)
Decompresses the specified data.
protected abstract byte[] DecompressCore(byte[] data, int offset, int length)
Parameters
data
byte[]Compressed data.
offset
intThe zero-based byte offset in
data
at which to begin reading the data to decompress.length
intThe number of bytes to be read from the compressed data.
Returns
- byte[]
The decompressed data.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)
Parameters
disposing
booltrue to release both managed and unmanaged resources; false to release only unmanaged resources.
~Compressor()
Releases unmanaged resources and performs other cleanup operations before the Compressor is reclaimed by garbage collection.
protected ~Compressor()
Init(Session)
Initializes the algorithm.
public virtual void Init(Session session)
Parameters
session
SessionThe session.