public interface CompressionCodec extends Closeable
| Modifier and Type | Interface and Description |
|---|---|
static class |
CompressionCodec.DataKind |
static interface |
CompressionCodec.Options |
static class |
CompressionCodec.SpeedModifier |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Return the codec to the pool.
|
boolean |
compress(ByteBuffer in,
ByteBuffer out,
ByteBuffer overflow,
CompressionCodec.Options options)
Compress the in buffer to the out buffer.
|
void |
decompress(ByteBuffer in,
ByteBuffer out)
Decompress the in buffer to the out buffer.
|
void |
destroy()
Closes the codec, releasing the resources.
|
CompressionCodec.Options |
getDefaultOptions()
Get the default options for this codec.
|
CompressionKind |
getKind()
Get the compression kind.
|
void |
reset()
Resets the codec, preparing it for reuse.
|
CompressionCodec.Options getDefaultOptions()
boolean compress(ByteBuffer in, ByteBuffer out, ByteBuffer overflow, CompressionCodec.Options options) throws IOException
in - the bytes to compressout - the compressed bytesoverflow - put any additional bytes hereoptions - the options to control compressionIOExceptionvoid decompress(ByteBuffer in, ByteBuffer out) throws IOException
in - the bytes to decompressout - the decompressed bytesIOExceptionvoid reset()
void destroy()
CompressionKind getKind()
void close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2013–2023 The Apache Software Foundation. All rights reserved.