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

public class Lz4RawCompressor extends NonBlockedCompressor
  • Constructor Details

    • Lz4RawCompressor

      public Lz4RawCompressor()
  • Method Details

    • maxCompressedLength

      protected int maxCompressedLength(int byteSize)
      Description copied from class: NonBlockedCompressor
      Get the maximum byte size needed for compressing data of the given byte size.
      Specified by:
      maxCompressedLength in class NonBlockedCompressor
      Parameters:
      byteSize - byte size of the data to compress
      Returns:
      maximum byte size of the compressed data
    • compress

      protected int compress(ByteBuffer uncompressed, ByteBuffer compressed) throws IOException
      Description copied from class: NonBlockedCompressor
      Compress 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:
      compress in class NonBlockedCompressor
      Parameters:
      uncompressed - buffer[pos() ... limit()) containing the input data
      compressed - output of the compressed data. Uses range [pos()..].
      Returns:
      byte size of the compressed data.
      Throws:
      IOException