Class LongGorillaEncoder

  • Direct Known Subclasses:
    DoublePrecisionEncoderV2

    public class LongGorillaEncoder
    extends GorillaEncoderV2
    This class includes code modified from Michael Burman's gorilla-tsc project.

    Copyright: 2016-2018 Michael Burman and/or other contributors

    Project page: https://github.com/burmanm/gorilla-tsc

    License: http://www.apache.org/licenses/LICENSE-2.0

    • Constructor Detail

      • LongGorillaEncoder

        public LongGorillaEncoder()
    • Method Detail

      • getOneItemMaxSize

        public final 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
      • encode

        public final void encode​(long value,
                                 java.io.ByteArrayOutputStream out)
        Overrides:
        encode in class Encoder
      • flush

        public void flush​(java.io.ByteArrayOutputStream out)
        Description copied from class: Encoder
        Write all values buffered in memory cache to OutputStream.
        Specified by:
        flush in class Encoder
        Parameters:
        out - - ByteArrayOutputStream