public class CompressionZlib extends Object implements Compression
Compression.Type| Constructor and Description |
|---|
CompressionZlib()
Create a new instance of a ZLib base compression
|
| Modifier and Type | Method and Description |
|---|---|
void |
compress(Buffer buffer)
Compress the given buffer in place.
|
void |
init(Compression.Type type,
int level)
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 CompressionZlib()
public boolean isDelayed()
CompressionisDelayed in interface Compressionpublic void init(Compression.Type type, int level)
Compressioncompress or uncompress.
Once the object has been initialized, only one of
compress or uncompress methods can be
called.init in interface Compressiontype - compression typelevel - compression levelpublic void compress(Buffer buffer) throws IOException
Compressioncompress in interface Compressionbuffer - the buffer containing the data to compressIOException - if an error occurspublic void uncompress(Buffer from, Buffer to) throws IOException
Compressionuncompress in interface Compressionfrom - the buffer containing the data to uncompressto - the buffer receiving the uncompressed dataIOException - if an error occursCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.