Package org.apache.parquet.compression
Interface CompressionCodecFactory.BytesInputCompressor
-
- Enclosing interface:
- CompressionCodecFactory
public static interface CompressionCodecFactory.BytesInputCompressorCompressor instance of a specific codec to be used for compressing page data.This compressor shall be released after use. This compressor shall not be used after release.
- See Also:
release()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BytesInputcompress(BytesInput bytes)Compresses the specifiedBytesInputdata and returns it asBytesInput.CompressionCodecNamegetCodecName()Returns the codec name of this compressor.voidrelease()Releases this compressor instance.
-
-
-
Method Detail
-
compress
BytesInput compress(BytesInput bytes) throws IOException
Compresses the specifiedBytesInputdata and returns it asBytesInput.Depending on the implementation
bytesmight be completely consumed. The returnedBytesInputinstance needs to be consumed before using this compressor again. This is because the implementation might use its internal buffer to directly provide the returnedBytesInputinstance.- Parameters:
bytes- the page data to be compressed- Returns:
- a
BytesInputcontaining the compressed data. Needs to be consumed before using this compressor again. - Throws:
IOException- if any I/O error occurs during the compression
-
getCodecName
CompressionCodecName getCodecName()
Returns the codec name of this compressor.- Returns:
- the codec name
-
release
void release()
Releases this compressor instance.No subsequent calls on this instance nor the returned
BytesInputinstance returned bycompress(BytesInput)shall be used after release.
-
-