Class HDTArray

  • Direct Known Subclasses:
    HDTArrayLog64

    abstract class HDTArray
    extends HDTPart
    HDT Array

    This part starts with a byte indicating the type of the array, followed by a byte containing the number of bits used to encode an entry in the array, and the VByte-encoded number of entries.

    Then the 8-bit CRC, followed by the array data itself.

    Structure:

     +------+--------+---------+------+------...
     | type | nrbits | entries | CRC8 | data
     +------+--------+---------+------+------...
     
    • Field Detail

      • nrbits

        protected int nrbits
      • entries

        protected int entries
    • Constructor Detail

      • HDTArray

        HDTArray()
    • Method Detail

      • getType

        protected abstract int getType()
        Get the type of the array
        Returns:
        byte
      • getNrBits

        protected int getNrBits()
        Get number of bits used to encode an entry
        Returns:
        positive integer value
      • size

        protected int size()
        Get number of entries in this array
        Returns:
        positive integer value
      • get

        protected abstract int get​(int i)
        Get entry from this array
        Parameters:
        i - zero-based index
        Returns:
        entry
      • parse

        protected void parse​(java.io.InputStream is)
                      throws java.io.IOException
        Description copied from class: HDTPart
        Parse from input stream
        Specified by:
        parse in class HDTPart
        Throws:
        java.io.IOException