docs: static void lowLevelUncompressPairs(
        final int[] pairArray,           // output
        final int numPairsToDecode,      // input, size of output, must be int
        final int numBaseBits,           // input, cannot exceed 6 bits
        final int[] compressedWords,     // input
        final long numCompressedWords) { // input
  
      int pairIndex = 0;
  
      final long[] ptrArr = new long[3];
      int nextWordIndex = 0;
      long bitBuf = 0;
      int bufBits = 0;
  
      final long golombLoMask = (1L << numBaseBits) - 1L;
  
      int predictedRowIndex = 0;
      int predictedColIndex = 0;
  
      // for each pair we need to read:
      // xDelta (12-bit length-limited unary)
      // yDeltaHi (unary)
      // yDeltaLo (basebits)
  
      for (pairIndex = 0; pairIndex < numPairsToDecode; pairIndex++) {
  
        //MAYBE_FILL_BITBUF(compressedWords,wordIndex,12); // ensure 12 bits in bit buffer
        if (bufBits < 12) { // Prepare for a 12-bit peek into the bitstream.
          bitBuf |= ((compressedWords[nextWordIndex++] & 0XFFFF_FFFFL) << bufBits);
          bufBits += 32;
        }
  
        final int peek12 = (int) (bitBuf & 0XFFFL);
        final int lookup = lengthLimitedUnaryDecodingTable65[peek12] & 0XFFFF;
        final int codeWordLength = lookup >>> 8;
        final int xDelta = lookup & 0XFF;
        bitBuf >>>= codeWordLength;
        bufBits -= codeWordLength;
  
        //TODO Inline ReadUnary
        ptrArr[NEXT_WORD_IDX] = nextWordIndex;
        ptrArr[BIT_BUF] = bitBuf;
        ptrArr[BUF_BITS] = bufBits;
        assert nextWordIndex == ptrArr[NEXT_WORD_IDX]; //catch sign extension error
  
        final long golombHi = readUnary(compressedWords, ptrArr);
  
        nextWordIndex = (int) ptrArr[NEXT_WORD_IDX];
        bitBuf = ptrArr[BIT_BUF];
        bufBits = (int) ptrArr[BUF_BITS];
        assert nextWordIndex == ptrArr[NEXT_WORD_IDX]; //catch truncation error
        //END Inline ReadUnary
  
        //MAYBE_FILL_BITBUF(compressedWords,wordIndex,numBaseBits); // ensure numBaseBits in bit buffer
        if (bufBits < numBaseBits) { // Prepare for a numBaseBits peek into the bitstream.
          bitBuf |= ((compressedWords[nextWordIndex++] & 0XFFFF_FFFFL) << bufBits);
          bufBits += 32;
        }
  
        final long golombLo = bitBuf & golombLoMask;
        bitBuf >>>= numBaseBits;
        bufBits -= numBaseBits;
        final long yDelta = (golombHi << numBaseBits) | golombLo;
  
        // Now that we have yDelta and xDelta, we can compute the pair's row and column.
        if (yDelta > 0) { predictedColIndex = 0; }
        final int rowIndex = predictedRowIndex + (int) yDelta;
        final int colIndex = predictedColIndex + xDelta;
        final int rowCol = (rowIndex << 6) | colIndex;
        pairArray[pairIndex] = rowCol;
        predictedRowIndex = rowIndex;
        predictedColIndex = colIndex + 1;
      }
      // check for buffer over-run
      assert (nextWordIndex <= numCompressedWords)
        : "nextWdIdx: " + nextWordIndex + ", #CompWds: " + numCompressedWords;
    }