Class DeltaBinaryDecoder
- java.lang.Object
-
- org.apache.iotdb.tsfile.encoding.decoder.Decoder
-
- org.apache.iotdb.tsfile.encoding.decoder.DeltaBinaryDecoder
-
- Direct Known Subclasses:
DeltaBinaryDecoder.IntDeltaDecoder,DeltaBinaryDecoder.LongDeltaDecoder
public abstract class DeltaBinaryDecoder extends Decoder
This class is a decoder for decoding the byte array that encoded byDeltaBinaryEncoder.DeltaBinaryDecoder just supports integer and long values.
.- See Also:
DeltaBinaryEncoder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeltaBinaryDecoder.IntDeltaDecoderstatic classDeltaBinaryDecoder.LongDeltaDecoder
-
Field Summary
Fields Modifier and Type Field Description protected longcountprotected byte[]deltaBufprotected intencodingLengthhow many bytes data takes after encoding.protected intnextReadIndexprotected intpackNumdata number in this pack.protected intpackWidthmax bit length of all value in a pack.protected intreadIntTotalCountthe first value in one pack.
-
Constructor Summary
Constructors Constructor Description DeltaBinaryDecoder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidallocateDataArray()protected intceil(int v)calculate the bytes length containing v bits.booleanhasNext(java.nio.ByteBuffer buffer)protected abstract voidreadHeader(java.nio.ByteBuffer buffer)protected abstract voidreadValue(int i)-
Methods inherited from class org.apache.iotdb.tsfile.encoding.decoder.Decoder
getDecoderByType, getType, readBigDecimal, readBinary, readBoolean, readDouble, readFloat, readInt, readLong, readShort, reset, setType
-
-
-
-
Field Detail
-
count
protected long count
-
deltaBuf
protected byte[] deltaBuf
-
readIntTotalCount
protected int readIntTotalCount
the first value in one pack.
-
nextReadIndex
protected int nextReadIndex
-
packWidth
protected int packWidth
max bit length of all value in a pack.
-
packNum
protected int packNum
data number in this pack.
-
encodingLength
protected int encodingLength
how many bytes data takes after encoding.
-
-
Method Detail
-
readHeader
protected abstract void readHeader(java.nio.ByteBuffer buffer) throws java.io.IOException- Throws:
java.io.IOException
-
allocateDataArray
protected abstract void allocateDataArray()
-
readValue
protected abstract void readValue(int i)
-
ceil
protected int ceil(int v)
calculate the bytes length containing v bits.- Parameters:
v- - number of bits- Returns:
- number of bytes
-
-