public class ZlibCompression extends java.lang.Object implements Compression
| Modifier and Type | Class and Description |
|---|---|
static class |
ZlibCompression.Factory
Named factory for the ZLib Compression.
|
Compression.Mode| Constructor and Description |
|---|
ZlibCompression() |
| Modifier and Type | Method and Description |
|---|---|
void |
compress(Buffer buffer)
Compress the given buffer in place.
|
void |
init(Compression.Mode mode)
Initialize this object to either compress or uncompress data.
|
boolean |
isDelayed()
Delayed compression is an Open-SSH specific feature which informs both the client and server to not compress data
before the session has been authenticated.
|
void |
uncompress(Buffer from,
Buffer to)
Uncompress the data in a buffer into another buffer.
|
public void init(Compression.Mode mode)
Compressioncompress or uncompress. Once the object has been initialized, only one of
compress or uncompress method can be called.init in interface Compressionpublic boolean isDelayed()
CompressionisDelayed in interface Compressionpublic void compress(Buffer buffer)
Compressioncompress in interface Compressionbuffer - the buffer containing the data to compress spublic void uncompress(Buffer from, Buffer to) throws TransportException
Compressionuncompress in interface Compressionfrom - the buffer containing the data to uncompressto - the buffer receiving the uncompressed dataTransportException