Class FloatEncoder


  • public class FloatEncoder
    extends Encoder
    Encoder for float or double value using rle or two-diff according to following grammar.
    
     float encoder: <maxPointvalue> <encoded-data>
     maxPointvalue := number for accuracy of decimal places, store as unsigned var int
     encoded-data := same as encoder's pattern
     
    • Constructor Detail

      • FloatEncoder

        public FloatEncoder​(TSEncoding encodingType,
                            TSDataType dataType,
                            int maxPointNumber)
    • Method Detail

      • getOneItemMaxSize

        public int getOneItemMaxSize()
        Description copied from class: Encoder
        When encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.
        Overrides:
        getOneItemMaxSize in class Encoder
        Returns:
        the maximal possible size of one data item encoded by this encoder
      • getMaxByteSize

        public long getMaxByteSize()
        Description copied from class: Encoder
        The maximal possible memory size occupied by current Encoder. This statistic value doesn't involve OutputStream.
        Overrides:
        getMaxByteSize in class Encoder
        Returns:
        the maximal size of possible memory occupied by current encoder