code: private long rank(long pos) {
  		pos *= 2;
  		assert pos >= 0;
  		assert pos <= bitVector.length();
  
  		int word = (int)(pos / Long.SIZE);
  		final int block = word / (WORDS_PER_SUPERBLOCK / 2) & ~1;
  		final int offset = ((word % WORDS_PER_SUPERBLOCK) / 6) - 1;
  
  		long result = count[block] + (count[block + 1] >> 12 * (offset + (offset >>> 32 - 4 & 6)) & 0x7FF) +
  				countNonzeroPairs(array[word] & (1L << pos % Long.SIZE) - 1);
  
  		for (int todo = (word & 0x1F) % 6; todo-- != 0;) result += countNonzeroPairs(array[--word]);
  		return result;
  	}
docs: This method implements a two-level ranking scheme. It is essentially a
  {@link Rank11} in which {@link Long#bitCount(long)} has been replaced
  by {@link #countNonzeroPairs(long)}.
  
  @param pos the position to rank in the 2-bit value array.
  @return the number of hinges before the specified position.