Interface Compression
- All Known Implementing Classes:
DelayedZlibCompression,NoneCompression,ZlibCompression
public interface Compression
Interface used to compress the stream of data between the SSH server and clients.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEnum identifying if this object will be used to compress or uncompress data. -
Method Summary
Modifier and TypeMethodDescriptionvoidCompress the given buffer in place.voidinit(Compression.Mode mode) Initialize this object to either compress or uncompress data.booleanDelayed 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 Details
-
init
Initialize 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.- Parameters:
mode-
-
isDelayed
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.- Returns:
- if the compression is delayed after authentication or not
-
compress
Compress the given buffer in place.- Parameters:
buffer- the buffer containing the data to compress s
-
uncompress
Uncompress the data in a buffer into another buffer.- Parameters:
from- the buffer containing the data to uncompressto- the buffer receiving the uncompressed data- Throws:
TransportException
-