Class ByteBasedBitPackingEncoder
java.lang.Object
org.apache.parquet.column.values.bitpacking.ByteBasedBitPackingEncoder
Uses the generated Byte based bit packing to write ints into a BytesInput
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglongmemUsageString(String prefix) org.apache.parquet.bytes.BytesInputtoBytes()voidwriteInt(int value) writes an int using the requested number of bits.
-
Constructor Details
-
ByteBasedBitPackingEncoder
- Parameters:
bitWidth- the number of bits used to encode an intpacker- factory for bit packing implementations
-
-
Method Details
-
writeInt
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
- 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
-