Class ByteBasedBitPackingEncoder

java.lang.Object
org.apache.parquet.column.values.bitpacking.ByteBasedBitPackingEncoder

public class ByteBasedBitPackingEncoder extends Object
Uses the generated Byte based bit packing to write ints into a BytesInput
  • Constructor Details

    • ByteBasedBitPackingEncoder

      public ByteBasedBitPackingEncoder(int bitWidth, Packer packer)
      Parameters:
      bitWidth - the number of bits used to encode an int
      packer - factory for bit packing implementations
  • Method Details

    • writeInt

      public void writeInt(int value) throws IOException
      writes an int using the requested number of bits. accepts only values less than 2^bitWidth
      Parameters:
      value - the value to write
      Throws:
      IOException - if there is an exception while writing
    • toBytes

      public org.apache.parquet.bytes.BytesInput toBytes() throws IOException
      Returns:
      the bytes representing the packed values
      Throws:
      IOException - if there is an exception while creating the BytesInput
    • getBufferSize

      public long getBufferSize()
      Returns:
      size of the data as it would be written
    • getAllocatedSize

      public long getAllocatedSize()
      Returns:
      total memory allocated
    • memUsageString

      public String memUsageString(String prefix)