Constructor and Description |
---|
BufferDecompressor(int bufferSize,
String factoryName) |
Modifier and Type | Method and Description |
---|---|
Buffer |
decompressToIntermediateBuffer(Buffer buffer)
Decompresses the given
Buffer using BlockDecompressor . |
Buffer |
decompressToOriginalBuffer(Buffer buffer)
The difference between this method and
decompressToIntermediateBuffer(Buffer) is that this method
copies the decompressed data to the input Buffer starting from offset 0. |
public BufferDecompressor(int bufferSize, String factoryName)
public Buffer decompressToIntermediateBuffer(Buffer buffer)
Buffer
using BlockDecompressor
. The decompressed data will be stored
in the intermediate buffer of this BufferDecompressor
and returned to the caller. The caller must
guarantee that the returned Buffer
has been freed when calling the method next time.
Notes that the decompression will always start from offset 0 to the size of the input Buffer
.
@VisibleForTesting public Buffer decompressToOriginalBuffer(Buffer buffer)
decompressToIntermediateBuffer(Buffer)
is that this method
copies the decompressed data to the input Buffer
starting from offset 0.
The caller must guarantee that the input Buffer
is writable and there's enough space left.
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.