Interface CompressorAdapter

All Superinterfaces:
AutoCloseable, SafeCloseable

public interface CompressorAdapter extends SafeCloseable
An Intermediate adapter interface between Deephaven column writing and parquet compression.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final CompressorAdapter
    An CompressorAdapter instance that reads and writes uncompressed data directly.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new output stream that will take uncompressed writes, and flush data to the provided stream as compressed data.
    org.apache.parquet.bytes.BytesInput
    decompress(InputStream inputStream, int compressedSize, int uncompressedSize)
    Returns an in-memory instance of BytesInput containing the fully decompressed results of the input stream.
    org.apache.parquet.hadoop.metadata.CompressionCodecName
     
    void
    Reset the internal state of this CompressorAdapter so more rows can be read or written.

    Methods inherited from interface io.deephaven.util.SafeCloseable

    close
  • Field Details

  • Method Details

    • compress

      OutputStream compress(OutputStream os) throws IOException
      Creates a new output stream that will take uncompressed writes, and flush data to the provided stream as compressed data.
      Parameters:
      os - the output stream to write compressed contents to
      Returns:
      an output stream that can accept writes
      Throws:
      IOException - thrown if an error occurs writing data
    • decompress

      org.apache.parquet.bytes.BytesInput decompress(InputStream inputStream, int compressedSize, int uncompressedSize) throws IOException
      Returns an in-memory instance of BytesInput containing the fully decompressed results of the input stream. Callers should process the results before inputStream is closed; if the BytesInput interface needs to persist longer than inputStream, callers should use BytesInput.copy(BytesInput) on the results.
      Parameters:
      inputStream - an input stream containing compressed data
      compressedSize - the number of bytes in the compressed data
      uncompressedSize - the number of bytes that should be present when decompressed
      Returns:
      the decompressed bytes, copied into memory
      Throws:
      IOException - thrown if an error occurs reading data.
    • getCodecName

      org.apache.parquet.hadoop.metadata.CompressionCodecName getCodecName()
      Returns:
      the CompressionCodecName enum value that represents this compressor.
    • reset

      void reset()
      Reset the internal state of this CompressorAdapter so more rows can be read or written.