com.mindbright.ssh2
public class SSH2CompressorZLib extends SSH2Compressor
COMPRESS_MODE, UNCOMPRESS_MODE
Constructor and Description |
---|
SSH2CompressorZLib() |
Modifier and Type | Method and Description |
---|---|
void |
compress(SSH2DataBuffer data)
Compress a block of data.
|
void |
init(int mode,
int level)
Initialize the compressor.
|
long |
numOfCompressedBytes()
Get the total number of bytes compressed.
|
long |
numOfUncompressedBytes()
Get the total number of bytes uncompressed.
|
int |
uncompress(SSH2DataBuffer data,
int len)
Uncompress a block of data.
|
authSucceeded, getInstance
public void init(int mode, int level)
SSH2Compressor
init
in class SSH2Compressor
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 SSH2Compressor
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 SSH2Compressor
data
- The block of data to uncompress.len
- How much data can be stored in the given buffer.SSH2CompressionException
public long numOfCompressedBytes()
SSH2Compressor
numOfCompressedBytes
in class SSH2Compressor
public long numOfUncompressedBytes()
SSH2Compressor
numOfUncompressedBytes
in class SSH2Compressor