com.mindbright.ssh2
Class SSH2CompressorZLibOpenSSH
java.lang.Object
com.mindbright.ssh2.SSH2Compressor
com.mindbright.ssh2.SSH2CompressorZLib
com.mindbright.ssh2.SSH2CompressorZLibOpenSSH
public class SSH2CompressorZLibOpenSSH
- extends SSH2CompressorZLib
Implements the zlib@openssh.com compression algorithm a implemented
in OpenSSH 4.2p1. This is just zlib but the compression starts when
the user has authenitcated successfully.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
authenticated
protected boolean authenticated
SSH2CompressorZLibOpenSSH
public SSH2CompressorZLibOpenSSH()
init
public void init(int mode,
int level)
- Description copied from class:
SSH2Compressor
- Initialize the compressor. Sets the mode (compress or uncompress) as
well as the desired level of compression.
- Overrides:
init
in class SSH2CompressorZLib
- Parameters:
mode
- Either COMPRESS_MODE
or
UNCOMPRESS_MODE
.level
- The level of compression. The exact meaning of this
is algorithm dependent.
compress
public void compress(SSH2DataBuffer data)
throws SSH2CompressionException
- Description copied from class:
SSH2Compressor
- Compress a block of data.
- Overrides:
compress
in class SSH2CompressorZLib
- Parameters:
data
- The block of data to compress. The compressed data is left
in the same buffer.
- Throws:
SSH2CompressionException
uncompress
public int uncompress(SSH2DataBuffer data,
int len)
throws SSH2CompressionException
- Description copied from class:
SSH2Compressor
- Uncompress a block of data. The uncompressed data is stored in the
SSH2DataBuffer
given so this one has to be big enough
to fit the uncompressed data block.
- Overrides:
uncompress
in class SSH2CompressorZLib
- Parameters:
data
- The block of data to uncompress.len
- How much data can be stored in the given buffer.
- Throws:
SSH2CompressionException
authSucceeded
public void authSucceeded()
- Description copied from class:
SSH2Compressor
- Tell compression library that uiser has authenticated
- Overrides:
authSucceeded
in class SSH2Compressor