Class DeltaBinaryEncoder.LongDeltaEncoder
- java.lang.Object
-
- org.apache.iotdb.tsfile.encoding.encoder.Encoder
-
- org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder
-
- org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder.LongDeltaEncoder
-
- Enclosing class:
- DeltaBinaryEncoder
public static class DeltaBinaryEncoder.LongDeltaEncoder extends DeltaBinaryEncoder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder
DeltaBinaryEncoder.IntDeltaEncoder, DeltaBinaryEncoder.LongDeltaEncoder
-
-
Field Summary
-
Fields inherited from class org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder
BLOCK_DEFAULT_SIZE, blockSize, encodingBlockBuffer, out, writeIndex, writeWidth
-
Fields inherited from class org.apache.iotdb.tsfile.encoding.encoder.Encoder
MAX_POINT_NUMBER, MAX_STRING_LENGTH
-
-
Constructor Summary
Constructors Constructor Description LongDeltaEncoder()LongDeltaEncoder(int size)constructor of LongDeltaEncoder which is a sub-class of DeltaBinaryEncoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcalcTwoDiff(int i)protected intcalculateBitWidthsForDeltaBlockBuffer()voidencode(long value, java.io.ByteArrayOutputStream out)voidencodeValue(long value, java.io.ByteArrayOutputStream out)input a integer or long value.longgetMaxByteSize()The maximal possible memory size occupied by current Encoder.intgetOneItemMaxSize()When encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.protected voidreset()protected voidwriteHeader()protected voidwriteValueToBytes(int i)-
Methods inherited from class org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder
flush
-
-
-
-
Method Detail
-
reset
protected void reset()
- Specified by:
resetin classDeltaBinaryEncoder
-
writeValueToBytes
protected void writeValueToBytes(int i)
- Specified by:
writeValueToBytesin classDeltaBinaryEncoder
-
calcTwoDiff
protected void calcTwoDiff(int i)
- Specified by:
calcTwoDiffin classDeltaBinaryEncoder
-
writeHeader
protected void writeHeader() throws java.io.IOException- Specified by:
writeHeaderin classDeltaBinaryEncoder- Throws:
java.io.IOException
-
encode
public void encode(long value, java.io.ByteArrayOutputStream out)
-
getOneItemMaxSize
public int getOneItemMaxSize()
Description copied from class:EncoderWhen encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.- Overrides:
getOneItemMaxSizein classEncoder- Returns:
- the maximal possible size of one data item encoded by this encoder
-
getMaxByteSize
public long getMaxByteSize()
Description copied from class:EncoderThe maximal possible memory size occupied by current Encoder. This statistic value doesn't involve OutputStream.- Overrides:
getMaxByteSizein classEncoder- Returns:
- the maximal size of possible memory occupied by current encoder
-
encodeValue
public void encodeValue(long value, java.io.ByteArrayOutputStream out)input a integer or long value.- Parameters:
value- value to encodeout- - the ByteArrayOutputStream which data encode into
-
calculateBitWidthsForDeltaBlockBuffer
protected int calculateBitWidthsForDeltaBlockBuffer()
- Specified by:
calculateBitWidthsForDeltaBlockBufferin classDeltaBinaryEncoder
-
-