public class AircompressorCodec extends Object implements CompressionCodec
CompressionCodec.DataKind, CompressionCodec.Options, 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.
|
protected static byte[] |
getBuffer(int size) |
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.
|
protected static byte[] getBuffer(int size)
public boolean compress(ByteBuffer in, ByteBuffer out, ByteBuffer overflow, CompressionCodec.Options options)
CompressionCodeccompress in interface CompressionCodecin - the bytes to compressout - the compressed bytesoverflow - put any additional bytes hereoptions - the options to control compressionpublic void decompress(ByteBuffer in, ByteBuffer out) throws IOException
CompressionCodecdecompress in interface CompressionCodecin - the bytes to decompressout - the decompressed bytesIOExceptionpublic CompressionCodec.Options getDefaultOptions()
CompressionCodecgetDefaultOptions in interface CompressionCodecpublic void reset()
CompressionCodecreset in interface CompressionCodecpublic void destroy()
CompressionCodecdestroy in interface CompressionCodecpublic CompressionKind getKind()
CompressionCodecgetKind in interface CompressionCodecpublic void close()
CompressionCodecclose in interface Closeableclose in interface AutoCloseableclose in interface CompressionCodecCopyright © 2013–2022 The Apache Software Foundation. All rights reserved.