Class LongChimpEncoder
- java.lang.Object
-
- org.apache.iotdb.tsfile.encoding.encoder.Encoder
-
- org.apache.iotdb.tsfile.encoding.encoder.GorillaEncoderV2
-
- org.apache.iotdb.tsfile.encoding.encoder.LongChimpEncoder
-
- Direct Known Subclasses:
DoublePrecisionChimpEncoder
public class LongChimpEncoder extends GorillaEncoderV2
This class includes code modified from Panagiotis Liakos chimp project.Copyright: 2022- Panagiotis Liakos, Katia Papakonstantinopoulou and Yannis Kotidis
Project page: https://github.com/panagiotisl/chimp
License: http://www.apache.org/licenses/LICENSE-2.0
-
-
Field Summary
Fields Modifier and Type Field Description protected static short[]LEADING_REPRESENTATIONprotected static short[]LEADING_ROUNDprotected static short[]leadingRepresentationprotected static short[]leadingRound-
Fields inherited from class org.apache.iotdb.tsfile.encoding.encoder.GorillaEncoderV2
bitsLeft, firstValueWasWritten, storedLeadingZeros, storedTrailingZeros
-
Fields inherited from class org.apache.iotdb.tsfile.encoding.encoder.Encoder
MAX_POINT_NUMBER, MAX_STRING_LENGTH
-
-
Constructor Summary
Constructors Constructor Description LongChimpEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencode(long value, java.io.ByteArrayOutputStream out)voidflush(java.io.ByteArrayOutputStream out)Write all values buffered in memory cache to OutputStream.intgetOneItemMaxSize()When encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.protected voidreset()-
Methods inherited from class org.apache.iotdb.tsfile.encoding.encoder.GorillaEncoderV2
flipByte, getMaxByteSize, skipBit, writeBit, writeBits
-
-
-
-
Method Detail
-
getOneItemMaxSize
public final 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
-
reset
protected void reset()
- Overrides:
resetin classGorillaEncoderV2
-
flush
public void flush(java.io.ByteArrayOutputStream out)
Description copied from class:EncoderWrite all values buffered in memory cache to OutputStream.
-
-