Class NoneCompression
java.lang.Object
com.sshtools.common.ssh.compression.NoneCompression
- All Implemented Interfaces:
Component,SshComponent,SshCompression
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.sshtools.common.ssh.compression.SshCompression
DEFLATER, INFLATER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]compress(byte[] data, int start, int len) Compress a block of data.Get the algorithm name for this compression implementation.voidinit(int type, int level) Initialize the compression.byte[]uncompress(byte[] data, int start, int len) Uncompress a block of data.
-
Constructor Details
-
NoneCompression
public NoneCompression()
-
-
Method Details
-
init
public void init(int type, int level) Description copied from interface:SshCompressionInitialize the compression.- Specified by:
initin interfaceSshCompression- Parameters:
type- the mode of the compression, should be either INFLATER or DEFLATERlevel- the level of compression
-
compress
Description copied from interface:SshCompressionCompress a block of data.- Specified by:
compressin interfaceSshCompression- Parameters:
data- the data to compressstart- the offset of the data to compresslen- the length of the data- Returns:
- the compressed data with any uncompressed data at the start remaining intact.
- Throws:
IOException
-
uncompress
Description copied from interface:SshCompressionUncompress a block of data.- Specified by:
uncompressin interfaceSshCompression- Parameters:
data- the data to uncompressstart- the offset of the data to uncompresslen- the length of the data- Returns:
- the uncompressed data with any data not compressed at the start remaining intact.
- Throws:
IOException
-
getAlgorithm
Description copied from interface:SshCompressionGet the algorithm name for this compression implementation.- Specified by:
getAlgorithmin interfaceSshComponent- Specified by:
getAlgorithmin interfaceSshCompression- Returns:
- the algorithm name.
-