org.apache.sshd.common
Interface Compression

All Known Implementing Classes:
CompressionDelayedZlib, CompressionNone, CompressionZlib

public interface Compression

Interface used to compress the stream of data between the SSH server and clients.

Author:
Apache MINA SSHD Project

Nested Class Summary
static class Compression.Type
          Enum identifying if this object will be used to compress or uncompress data.
 
Method Summary
 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.
 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.
 void uncompress(Buffer from, Buffer to)
          Uncompress the data in a buffer into another buffer.
 

Method Detail

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

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 either compress or uncompress. Once the object has been initialized, only one of compress or uncompress methods can be called.

Parameters:
type -
level -

compress

void compress(Buffer buffer)
              throws IOException
Compress the given buffer in place.

Parameters:
buffer - the buffer containing the data to compress
Throws:
IOException - if an error occurs

uncompress

void uncompress(Buffer from,
                Buffer to)
                throws IOException
Uncompress the data in a buffer into another buffer.

Parameters:
from - the buffer containing the data to uncompress
to - the buffer receiving the uncompressed data
Throws:
IOException - if an error occurs


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.