public class RunLengthIntegerWriterV2 extends Object implements IntegerWriter
There are four types of lightweight integer compression
SHORT_REPEAT: Used for short repeated integer sequences.
DIRECT: Used for random integer sequences whose number of bit requirement doesn't vary a lot.
PATCHED_BASE: Used for random integer sequences whose number of bit requirement varies beyond a threshold.
DELTA Used for monotonically increasing or decreasing sequences, sequences with fixed delta values or long repeated sequences.
Modifier and Type | Class and Description |
---|---|
static class |
RunLengthIntegerWriterV2.EncodingType |
Constructor and Description |
---|
RunLengthIntegerWriterV2(PositionedOutputStream output,
boolean signed,
boolean alignedBitpacking) |
Modifier and Type | Method and Description |
---|---|
void |
flush()
Flush the buffer
|
void |
getPosition(PositionRecorder recorder)
Get position from the stream.
|
void |
write(long val)
Write the integer value
|
public RunLengthIntegerWriterV2(PositionedOutputStream output, boolean signed, boolean alignedBitpacking)
public void flush() throws IOException
IntegerWriter
flush
in interface IntegerWriter
IOException
public void write(long val) throws IOException
IntegerWriter
write
in interface IntegerWriter
IOException
public void getPosition(PositionRecorder recorder) throws IOException
IntegerWriter
getPosition
in interface IntegerWriter
IOException
Copyright © 2016 The Apache Software Foundation. All rights reserved.