public interface SshCompression extends SshComponent
Compression interface which can be implemented to provide the SSH Transport Protocol with compression.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFLATER
Deflation mode
|
static int |
INFLATER
Inflation mode
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compress(byte[] data,
int start,
int len)
Compress a block of data.
|
java.lang.String |
getAlgorithm()
Get the algorithm name for this compression implementation.
|
void |
init(int type,
int level)
Initialize the compression.
|
byte[] |
uncompress(byte[] data,
int start,
int len)
Uncompress a block of data.
|
static final int INFLATER
static final int DEFLATER
void init(int type,
int level)
type - the mode of the compression, should be either INFLATER or DEFLATERlevel - the level of compressionbyte[] compress(byte[] data,
int start,
int len)
throws java.io.IOException
data - the data to compressstart - the offset of the data to compresslen - the length of the datajava.io.IOExceptionbyte[] uncompress(byte[] data,
int start,
int len)
throws java.io.IOException
data - the data to uncompressstart - the offset of the data to uncompresslen - the length of the datajava.io.IOExceptionjava.lang.String getAlgorithm()
getAlgorithm in interface SshComponentCopyright © 2022. All rights reserved.