Package com.rabbitmq.stream.compression
Class CompressionUtils.CommonsCompressSnappyCompressionCodec
java.lang.Object
com.rabbitmq.stream.compression.CompressionUtils.CommonsCompressSnappyCompressionCodec
- All Implemented Interfaces:
CompressionCodec
- Enclosing class:
CompressionUtils
public static class CompressionUtils.CommonsCompressSnappyCompressionCodec
extends Object
implements CompressionCodec
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte
code()
Return the code for this type of codec.compress
(OutputStream outputStream) Creates anOutputStream
to compress data.decompress
(InputStream inputStream) Creates anInputStream
to read decompressed data from.int
maxCompressedLength
(int sourceLength) Provides the maximum compressed size from the source length.toString()
-
Constructor Details
-
CommonsCompressSnappyCompressionCodec
public CommonsCompressSnappyCompressionCodec()
-
-
Method Details
-
maxCompressedLength
public int maxCompressedLength(int sourceLength) Description copied from interface:CompressionCodec
Provides the maximum compressed size from the source length.- Specified by:
maxCompressedLength
in interfaceCompressionCodec
- Parameters:
sourceLength
- size of plain, uncompressed data- Returns:
- maximum compressed size
-
compress
Description copied from interface:CompressionCodec
Creates anOutputStream
to compress data.- Specified by:
compress
in interfaceCompressionCodec
- Parameters:
outputStream
- the stream where compressed data will end up- Returns:
- output stream to write plain data to
-
decompress
Description copied from interface:CompressionCodec
Creates anInputStream
to read decompressed data from.- Specified by:
decompress
in interfaceCompressionCodec
- Parameters:
inputStream
- the stream to read compressed data from- Returns:
- input stream to read decompressed data from
-
code
public byte code()Description copied from interface:CompressionCodec
Return the code for this type of codec.- Specified by:
code
in interfaceCompressionCodec
- Returns:
- compression code
-
toString
-