Package org.apache.parquet.hadoop.codec
Class Lz4RawCompressor
java.lang.Object
org.apache.parquet.hadoop.codec.NonBlockedCompressor
org.apache.parquet.hadoop.codec.Lz4RawCompressor
- All Implemented Interfaces:
org.apache.hadoop.io.compress.Compressor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcompress(ByteBuffer uncompressed, ByteBuffer compressed) Compress the content in the given input buffer.protected intmaxCompressedLength(int byteSize) Get the maximum byte size needed for compressing data of the given byte size.Methods inherited from class org.apache.parquet.hadoop.codec.NonBlockedCompressor
compress, end, finish, finished, getBytesRead, getBytesWritten, needsInput, reinit, reset, setDictionary, setInput
-
Constructor Details
-
Lz4RawCompressor
public Lz4RawCompressor()
-
-
Method Details
-
maxCompressedLength
protected int maxCompressedLength(int byteSize) Description copied from class:NonBlockedCompressorGet the maximum byte size needed for compressing data of the given byte size.- Specified by:
maxCompressedLengthin classNonBlockedCompressor- Parameters:
byteSize- byte size of the data to compress- Returns:
- maximum byte size of the compressed data
-
compress
Description copied from class:NonBlockedCompressorCompress the content in the given input buffer. After the compression, you can retrieve the compressed data from the output buffer [pos() ... limit()) (compressed data size = limit() - pos() = remaining())- Specified by:
compressin classNonBlockedCompressor- Parameters:
uncompressed- buffer[pos() ... limit()) containing the input datacompressed- output of the compressed data. Uses range [pos()..].- Returns:
- byte size of the compressed data.
- Throws:
IOException
-