Class NoneCompression

java.lang.Object
com.sshtools.common.ssh.compression.NoneCompression
All Implemented Interfaces:
Component, SshComponent, SshCompression

public class NoneCompression extends Object implements SshCompression
  • Constructor Details

    • NoneCompression

      public NoneCompression()
  • Method Details

    • init

      public void init(int type, int level)
      Description copied from interface: SshCompression
      Initialize the compression.
      Specified by:
      init in interface SshCompression
      Parameters:
      type - the mode of the compression, should be either INFLATER or DEFLATER
      level - the level of compression
    • compress

      public byte[] compress(byte[] data, int start, int len) throws IOException
      Description copied from interface: SshCompression
      Compress a block of data.
      Specified by:
      compress in interface SshCompression
      Parameters:
      data - the data to compress
      start - the offset of the data to compress
      len - the length of the data
      Returns:
      the compressed data with any uncompressed data at the start remaining intact.
      Throws:
      IOException
    • uncompress

      public byte[] uncompress(byte[] data, int start, int len) throws IOException
      Description copied from interface: SshCompression
      Uncompress a block of data.
      Specified by:
      uncompress in interface SshCompression
      Parameters:
      data - the data to uncompress
      start - the offset of the data to uncompress
      len - the length of the data
      Returns:
      the uncompressed data with any data not compressed at the start remaining intact.
      Throws:
      IOException
    • getAlgorithm

      public String getAlgorithm()
      Description copied from interface: SshCompression
      Get the algorithm name for this compression implementation.
      Specified by:
      getAlgorithm in interface SshComponent
      Specified by:
      getAlgorithm in interface SshCompression
      Returns:
      the algorithm name.