Interface Compression
-
- All Superinterfaces:
CompressionInformation
,NamedResource
- All Known Implementing Classes:
BaseCompression
,CompressionDelayedZlib
,CompressionNone
,CompressionZlib
public interface Compression extends CompressionInformation
Interface used to compress the stream of data between the SSH server and clients.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Compression.Type
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
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.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 Detail
-
init
void init(Compression.Type type, int level)
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
void compress(Buffer buffer) throws java.io.IOException
Compress the given buffer in place.- Parameters:
buffer
- the buffer containing the data to compress- Throws:
java.io.IOException
- if an error occurs
-
-