int getRankInBlock(int rankPosition) {
    if (rank == null) {
      return -1;
    }
    assert rankPosition == denseRankPosition(rankPosition);
    int rankIndex = rankPosition >> RANK_BLOCK_BITS;
    return rankIndex >= rank.size() ? -1 : (int) rank.get(rankIndex);
  }
int getRankInBlock(int rankPosition) {
    if (rank == null) {
      return -1;
    }
    assert rankPosition == denseRankPosition(rankPosition);
    int rankIndex = rankPosition >> RANK_BLOCK_BITS;
    return rankIndex >= rank.size() ? -1 : (int) rank.get(rankIndex);
  }
int getrankinblock(int rankposition) { if (rank == null) { return -1; } assert rankposition == denserankposition(rankposition); int rankindex = rankposition >> rank_block_bits; return rankindex >= rank.size() ? -1 : (int) rank.get(rankindex); }