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 enum
Enum 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 TypeMethodDescriptionvoid
Compress the given buffer in place.void
init
(Compression.Type type, int level) Initialize this object to either compress or uncompress data.void
uncompress
(Buffer from, Buffer to) Uncompress the data in a buffer into another buffer.Methods inherited from interface org.apache.sshd.common.compression.CompressionInformation
isCompressionExecuted, isDelayed
Methods 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 eithercompress
oruncompress
. Once the object has been initialized, only one ofcompress
oruncompress
methods 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
-