com.mindbright.ssh2
public class SSH2CompressorZLibOpenSSH extends SSH2CompressorZLib
Modifier and Type | Field and Description |
---|---|
protected boolean |
authenticated |
COMPRESS_MODE, UNCOMPRESS_MODE
Constructor and Description |
---|
SSH2CompressorZLibOpenSSH() |
Modifier and Type | Method and Description |
---|---|
void |
authSucceeded()
Tell compression library that uiser has authenticated
|
void |
compress(SSH2DataBuffer data)
Compress a block of data.
|
void |
init(int mode,
int level)
Initialize the compressor.
|
int |
uncompress(SSH2DataBuffer data,
int len)
Uncompress a block of data.
|
numOfCompressedBytes, numOfUncompressedBytes
getInstance
public void init(int mode, int level)
SSH2Compressor
init
in class SSH2CompressorZLib
mode
- Either COMPRESS_MODE
or
UNCOMPRESS_MODE
.level
- The level of compression. The exact meaning of this
is algorithm dependent.public void compress(SSH2DataBuffer data) throws SSH2CompressionException
SSH2Compressor
compress
in class SSH2CompressorZLib
data
- The block of data to compress. The compressed data is left
in the same buffer.SSH2CompressionException
public int uncompress(SSH2DataBuffer data, int len) throws SSH2CompressionException
SSH2Compressor
SSH2DataBuffer
given so this one has to be big enough
to fit the uncompressed data block.uncompress
in class SSH2CompressorZLib
data
- The block of data to uncompress.len
- How much data can be stored in the given buffer.SSH2CompressionException
public void authSucceeded()
SSH2Compressor
authSucceeded
in class SSH2Compressor