code: public int getGroup(int codepoint)
      {
          int endGroup = m_groupcount_;
          int msb      = getCodepointMSB(codepoint);
          int result   = 0;
          // binary search for the group of names that contains the one for
          // code
          // find the group that contains codepoint, or the highest before it
          while (result < endGroup - 1) {
              int gindex = (result + endGroup) >> 1;
              if (msb < getGroupMSB(gindex)) {
                  endGroup = gindex;
              }
              else {
                  result = gindex;
              }
          }
          return result;
      }
docs: Gets the group index for the codepoint, or the group before it.
  @param codepoint The codepoint index.
  @return group index containing codepoint or the group before it.