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