code: public int get(int index) {
          if (d_bitsPerElem == 0)
              return 0;
  
          int startIdx = (index * d_bitsPerElem) / INT_SIZE;
          int startBit = (index * d_bitsPerElem) % INT_SIZE;
  
          int result = (d_data[startIdx] >>> startBit) & MASK[d_bitsPerElem];
  
          if ((startBit + d_bitsPerElem) > INT_SIZE) {
              int done = INT_SIZE - startBit;
              result |= (d_data[startIdx + 1] & MASK[d_bitsPerElem - done]) << done;
          }
  
          return result;
      }
docs: Get the integer at the given index.
  
  @param index The index.
  @return An integer.