@InterfaceAudience.Private public interface ByteBuffDecompressor extends Closeable
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecompress(ByteBuff output,
ByteBuff input)
Signals of these two particular
ByteBuffs are compatible with this decompressor. |
int |
decompress(ByteBuff output,
ByteBuff input,
int inputLen)
Fills the ouput buffer with uncompressed data.
|
void |
reinit(Compression.HFileDecompressionContext newHFileDecompressionContext)
Call before every use of
canDecompress(ByteBuff, ByteBuff) and
decompress(ByteBuff, ByteBuff, int) to reinitialize the decompressor with settings
from the HFileInfo. |
int decompress(ByteBuff output, ByteBuff input, int inputLen) throws IOException
canDecompress(ByteBuff, ByteBuff) first to check if this decompressor can handle your
input and output buffers.IOExceptionboolean canDecompress(ByteBuff output, ByteBuff input)
ByteBuffs 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. Different ByteBuffDecompressors may be able to handle different
combinations of these, so always check.void reinit(@Nullable
Compression.HFileDecompressionContext newHFileDecompressionContext)
canDecompress(ByteBuff, ByteBuff) and
decompress(ByteBuff, ByteBuff, int) to reinitialize the decompressor with settings
from the HFileInfo. This can matter because ByteBuffDecompressors are reused many times.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.