Class DeltaBinaryEncoder.LongDeltaEncoder

    • Constructor Detail

      • LongDeltaEncoder

        public LongDeltaEncoder()
      • LongDeltaEncoder

        public LongDeltaEncoder​(int size)
        constructor of LongDeltaEncoder which is a sub-class of DeltaBinaryEncoder.
        Parameters:
        size - - the number how many numbers to be packed into a block.
    • Method Detail

      • writeHeader

        protected void writeHeader()
                            throws java.io.IOException
        Specified by:
        writeHeader in class DeltaBinaryEncoder
        Throws:
        java.io.IOException
      • encode

        public void encode​(long value,
                           java.io.ByteArrayOutputStream out)
        Overrides:
        encode in class Encoder
      • 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
      • encodeValue

        public void encodeValue​(long value,
                                java.io.ByteArrayOutputStream out)
        input a integer or long value.
        Parameters:
        value - value to encode
        out - - the ByteArrayOutputStream which data encode into