Interface Compression
- All Superinterfaces:
CompressionInformation,NamedResource
- All Known Implementing Classes:
BaseCompression,CompressionDelayedZlib,CompressionNone,CompressionZlib
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. -
Field Summary
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR -
Method Summary
Modifier and TypeMethodDescriptionvoidCompress the given buffer in place.voidinit(Compression.Type type, int level) Initialize this object to either compress or uncompress data.voiduncompress(Buffer from, Buffer to) Uncompress the data in a buffer into another buffer.Methods inherited from interface org.apache.sshd.common.compression.CompressionInformation
isCompressionExecuted, isDelayedMethods inherited from interface org.apache.sshd.common.NamedResource
getName
-
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 ofcompressoruncompressmethods can be called.- Parameters:
type- compression typelevel- compression level
-
compress
Compress the given buffer in place.- Parameters:
buffer- the buffer containing the data to compress- Throws:
IOException- if an error occurs
-
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:
IOException- if an error occurs
-