public class ZlibCodec extends Object implements CompressionCodec, DirectDecompressionCodec
CompressionCodec.Modifier| Constructor and Description |
|---|
ZlibCodec() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the codec, releasing the resources.
|
boolean |
compress(ByteBuffer in,
ByteBuffer out,
ByteBuffer overflow)
Compress the in buffer to the out buffer.
|
void |
decompress(ByteBuffer in,
ByteBuffer out)
Decompress the in buffer to the out buffer.
|
void |
directDecompress(ByteBuffer in,
ByteBuffer out) |
boolean |
isAvailable() |
CompressionCodec |
modify(EnumSet<CompressionCodec.Modifier> modifiers)
Produce a modified compression codec if the underlying algorithm allows
modification.
|
void |
reset()
Resets the codec, preparing it for reuse.
|
public boolean compress(ByteBuffer in, ByteBuffer out, ByteBuffer overflow) throws IOException
CompressionCodeccompress in interface CompressionCodecin - the bytes to compressout - the uncompressed bytesoverflow - put any additional bytes hereIOExceptionpublic void decompress(ByteBuffer in, ByteBuffer out) throws IOException
CompressionCodecdecompress in interface CompressionCodecin - the bytes to decompressout - the decompressed bytesIOExceptionpublic boolean isAvailable()
isAvailable in interface DirectDecompressionCodecpublic void directDecompress(ByteBuffer in, ByteBuffer out) throws IOException
directDecompress in interface DirectDecompressionCodecIOExceptionpublic CompressionCodec modify(EnumSet<CompressionCodec.Modifier> modifiers)
CompressionCodecmodify in interface CompressionCodecmodifiers - compression modifiers (nullable)public void reset()
CompressionCodecreset in interface CompressionCodecpublic void close()
CompressionCodecclose in interface CompressionCodecCopyright © 2013–2018 The Apache Software Foundation. All rights reserved.