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, getInstancepublic void init(int mode,
int level)
SSH2Compressorinit in class SSH2Compressormode - 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
SSH2Compressorcompress in class SSH2Compressordata - The block of data to compress. The compressed data is left
in the same buffer.SSH2CompressionExceptionpublic int uncompress(SSH2DataBuffer data, int len) throws SSH2CompressionException
SSH2CompressorSSH2DataBuffer given so this one has to be big enough
to fit the uncompressed data block.uncompress in class SSH2Compressordata - The block of data to uncompress.len - How much data can be stored in the given buffer.SSH2CompressionExceptionpublic long numOfCompressedBytes()
SSH2CompressornumOfCompressedBytes in class SSH2Compressorpublic long numOfUncompressedBytes()
SSH2CompressornumOfUncompressedBytes in class SSH2Compressor