Class 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 Detail

      • LEADING_REPRESENTATION

        protected static final short[] LEADING_REPRESENTATION
      • LEADING_ROUND

        protected static final short[] LEADING_ROUND
      • leadingRepresentation

        protected static final short[] leadingRepresentation
      • leadingRound

        protected static final short[] leadingRound
    • Constructor Detail

      • LongChimpEncoder

        public LongChimpEncoder()
    • 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
      • 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
      • encode

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