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 Summary
Constructors Constructor Description ByteBasedBitPackingEncoder(int bitWidth, Packer packer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAllocatedSize()longgetBufferSize()StringmemUsageString(String prefix)org.apache.parquet.bytes.BytesInputtoBytes()voidwriteInt(int value)writes an int using the requested number of bits.
-
-
-
Constructor Detail
-
ByteBasedBitPackingEncoder
public ByteBasedBitPackingEncoder(int bitWidth, Packer packer)- Parameters:
bitWidth- the number of bits used to encode an intpacker- factory for bit packing implementations
-
-
Method Detail
-
writeInt
public void writeInt(int value) throws IOExceptionwrites 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
-
-