Class ZlibCompression
- java.lang.Object
-
- net.schmizz.sshj.transport.compression.ZlibCompression
-
- All Implemented Interfaces:
Compression
- Direct Known Subclasses:
DelayedZlibCompression
public class ZlibCompression extends java.lang.Object implements Compression
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classZlibCompression.FactoryNamed factory for the ZLib Compression.-
Nested classes/interfaces inherited from interface net.schmizz.sshj.transport.compression.Compression
Compression.Mode
-
-
Constructor Summary
Constructors Constructor Description ZlibCompression()
-
Method Summary
Modifier and Type Method Description voidcompress(Buffer buffer)Compress the given buffer in place.voidinit(Compression.Mode mode)Initialize this object to either compress or uncompress data.booleanisDelayed()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.voiduncompress(Buffer from, Buffer to)Uncompress the data in a buffer into another buffer.
-
-
-
Method Detail
-
init
public void init(Compression.Mode mode)
Description copied from interface:CompressionInitialize this object to either compress or uncompress data. This method must be called prior to any calls to eithercompressoruncompress. Once the object has been initialized, only one ofcompressoruncompressmethod can be called.- Specified by:
initin interfaceCompression
-
isDelayed
public boolean isDelayed()
Description copied from interface:CompressionDelayed compression is an Open-SSH specific feature which informs both the client and server to not compress data before the session has been authenticated.- Specified by:
isDelayedin interfaceCompression- Returns:
- if the compression is delayed after authentication or not
-
compress
public void compress(Buffer buffer)
Description copied from interface:CompressionCompress the given buffer in place.- Specified by:
compressin interfaceCompression- Parameters:
buffer- the buffer containing the data to compress s
-
uncompress
public void uncompress(Buffer from, Buffer to) throws TransportException
Description copied from interface:CompressionUncompress the data in a buffer into another buffer.- Specified by:
uncompressin interfaceCompression- Parameters:
from- the buffer containing the data to uncompressto- the buffer receiving the uncompressed data- Throws:
TransportException
-
-