public static interface CompressionCodecFactory.BytesInputCompressor
This compressor shall be released after use. This compressor shall not be used after release.
release()| Modifier and Type | Method and Description |
|---|---|
BytesInput |
compress(BytesInput bytes)
Compresses the specified
BytesInput data and returns it as BytesInput. |
CompressionCodecName |
getCodecName()
Returns the codec name of this compressor.
|
void |
release()
Releases this compressor instance.
|
BytesInput compress(BytesInput bytes) throws IOException
BytesInput data and returns it as BytesInput.
Depending on the implementation bytes might be completely consumed. The returned BytesInput
instance needs to be consumed before using this compressor again. This is because the implementation might use
its internal buffer to directly provide the returned BytesInput instance.
bytes - the page data to be compressedBytesInput containing the compressed data. Needs to be consumed before using this compressor
again.IOException - if any I/O error occurs during the compressionCompressionCodecName getCodecName()
void release()
No subsequent calls on this instance nor the returned BytesInput instance returned by
compress(BytesInput) shall be used after release.
Copyright © 2023 The Apache Software Foundation. All rights reserved.