Interface ByteBuffDecompressor
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
ZstdByteBuffDecompressor
Specification of a ByteBuff-based decompressor, which can be more efficient than the stream-based
Decompressor.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecompress
(ByteBuff output, ByteBuff input) Signals of these two particularByteBuff
s are compatible with this decompressor.int
decompress
(ByteBuff output, ByteBuff input, int inputLen) Fills the ouput buffer with uncompressed data.
-
Method Details
-
decompress
Fills the ouput buffer with uncompressed data. Always callcanDecompress(ByteBuff, ByteBuff)
first to check if this decompressor can handle your input and output buffers.- Returns:
- The actual number of bytes of uncompressed data.
- Throws:
IOException
-
canDecompress
Signals of these two particularByteBuff
s are compatible with this decompressor. ByteBuffs can have one or multiple backing buffers, and each of these may be stored in heap or direct memory. DifferentByteBuffDecompressor
s may be able to handle different combinations of these, so always check.
-