Class BigEndianAscendingWordDeserializer

    • Constructor Detail

      • BigEndianAscendingWordDeserializer

        public BigEndianAscendingWordDeserializer​(int wordLength,
                                                  int bytePadding,
                                                  byte[] bytes)
        Parameters:
        wordLength - the length in bits of the words to be deserialized. Must be less than or equal to 64 and greater than or equal to 1.
        bytePadding - the number of leading bytes that pad the serialized words. Must be greater than or equal to zero.
        bytes - the byte array containing the serialized words. Cannot be null.
    • Method Detail

      • totalWordCount

        public int totalWordCount()
        Description copied from interface: IWordDeserializer
        Returns the number of words that could be encoded in the sequence.

        NOTE: the sequence that was encoded may be shorter than the value this method returns due to padding issues within bytes. This guarantees only an upper bound on the number of times IWordDeserializer.readWord() can be called.

        Specified by:
        totalWordCount in interface IWordDeserializer
        Returns:
        the maximum number of words that could be read from the sequence.