Class GorillaDecoderV2

  • Direct Known Subclasses:
    IntChimpDecoder, IntGorillaDecoder, LongChimpDecoder, LongGorillaDecoder

    public abstract class GorillaDecoderV2
    extends Decoder
    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

    • Field Detail

      • firstValueWasRead

        protected boolean firstValueWasRead
      • storedLeadingZeros

        protected int storedLeadingZeros
      • storedTrailingZeros

        protected int storedTrailingZeros
      • hasNext

        protected boolean hasNext
    • Constructor Detail

      • GorillaDecoderV2

        protected GorillaDecoderV2()
    • Method Detail

      • hasNext

        public final boolean hasNext​(java.nio.ByteBuffer in)
        Specified by:
        hasNext in class Decoder
      • reset

        public void reset()
        Specified by:
        reset in class Decoder
      • readBit

        protected boolean readBit​(java.nio.ByteBuffer in)
        Reads the next bit and returns a boolean representing it.
        Returns:
        true if the next bit is 1, otherwise 0.
      • readLong

        protected long readLong​(int bits,
                                java.nio.ByteBuffer in)
        Reads a long from the next X bits that represent the least significant bits in the long value.
        Parameters:
        bits - How many next bits are read from the stream
        Returns:
        long value that was read from the stream
      • readNextClearBit

        protected byte readNextClearBit​(int maxBits,
                                        java.nio.ByteBuffer in)
      • flipByte

        protected void flipByte​(java.nio.ByteBuffer in)