public static class DeltaBinaryEncoder.LongDeltaEncoder extends DeltaBinaryEncoder
DeltaBinaryEncoder.IntDeltaEncoder, DeltaBinaryEncoder.LongDeltaEncoderBLOCK_DEFAULT_SIZE, blockSize, encodingBlockBuffer, out, writeIndex, writeWidthMAX_POINT_NUMBER, MAX_STRING_LENGTH| Constructor and Description |
|---|
LongDeltaEncoder() |
LongDeltaEncoder(int size)
constructor of LongDeltaEncoder which is a sub-class of DeltaBinaryEncoder.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
calcTwoDiff(int i) |
protected int |
calculateBitWidthsForDeltaBlockBuffer() |
void |
encode(long value,
ByteArrayOutputStream out) |
void |
encodeValue(long value,
ByteArrayOutputStream out)
input a integer or long value.
|
long |
getMaxByteSize()
The maximal possible memory size occupied by current Encoder.
|
int |
getOneItemMaxSize()
When encoder accepts a new incoming data point, the maximal possible size in byte it takes to
store in memory.
|
protected void |
reset() |
protected void |
writeHeader() |
protected void |
writeValueToBytes(int i) |
flushpublic LongDeltaEncoder()
public LongDeltaEncoder(int size)
size - - the number how many numbers to be packed into a block.protected void reset()
reset in class DeltaBinaryEncoderprotected void writeValueToBytes(int i)
writeValueToBytes in class DeltaBinaryEncoderprotected void calcTwoDiff(int i)
calcTwoDiff in class DeltaBinaryEncoderprotected void writeHeader()
throws IOException
writeHeader in class DeltaBinaryEncoderIOExceptionpublic void encode(long value,
ByteArrayOutputStream out)
public int getOneItemMaxSize()
EncodergetOneItemMaxSize in class Encoderpublic long getMaxByteSize()
EncodergetMaxByteSize in class Encoderpublic void encodeValue(long value,
ByteArrayOutputStream out)
value - value to encodeout - - the ByteArrayOutputStream which data encode intoprotected int calculateBitWidthsForDeltaBlockBuffer()
calculateBitWidthsForDeltaBlockBuffer in class DeltaBinaryEncoderCopyright © 2022 The Apache Software Foundation. All rights reserved.