public interface SshCompression extends SshComponent, SecureComponent
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.
|
String |
getAlgorithm()
Get the algorithm name for this compression implementation.
|
void |
init(int type,
int level)
Initialize the compression.
|
boolean |
isDelayed()
Is this compression delayed until after authentication
|
byte[] |
uncompress(byte[] data,
int start,
int len)
Uncompress a block of data.
|
getPriority, getSecurityLevel
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 compressionboolean isDelayed()
byte[] compress(byte[] data, int start, int len) throws IOException
data
- the data to compressstart
- the offset of the data to compresslen
- the length of the dataIOException
byte[] uncompress(byte[] data, int start, int len) throws IOException
data
- the data to uncompressstart
- the offset of the data to uncompresslen
- the length of the dataIOException
String getAlgorithm()
getAlgorithm
in interface SecureComponent
getAlgorithm
in interface SshComponent
Copyright © 2024. All rights reserved.