public class ZLibCompression extends Object implements SshCompression
DEFLATER, INFLATER| Constructor and Description |
|---|
ZLibCompression() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compress(byte[] buf,
int start,
int len)
Compress a block of data.
|
String |
getAlgorithm()
Get the algorithm name for this compression implementation.
|
void |
init(int type,
int level)
Initialize the compression.
|
byte[] |
uncompress(byte[] buffer,
int start,
int length)
Uncompress a block of data.
|
public String getAlgorithm()
SshCompressiongetAlgorithm in interface SshCompressionpublic void init(int type,
int level)
SshCompressioninit in interface SshCompressiontype - the mode of the compression, should be either INFLATER or
DEFLATERlevel - the level of compressionpublic byte[] compress(byte[] buf,
int start,
int len)
throws IOException
SshCompressioncompress in interface SshCompressionbuf - the data to compressstart - the offset of the data to compresslen - the length of the dataIOExceptionpublic byte[] uncompress(byte[] buffer,
int start,
int length)
throws IOException
SshCompressionuncompress in interface SshCompressionbuffer - the data to uncompressstart - the offset of the data to uncompresslength - the length of the dataIOExceptionCopyright © 2014. All rights reserved.