public static OpenBitSet deserialize(DataInput in, int maxPageCount) throws IOException {
    long bitLength = in.readInt();
    OpenBitSet bs = new OpenBitSet(bitLength << 6, maxPageCount);
    int pageSize = bs.getPageSize();
    int pageCount = bs.getPageCount();

    for (int p = 0; p < pageCount; p++) {
      long[] bits = bs.getPage(p);
      for (int i = 0; i < pageSize && bitLength-- > 0; i++) {
        bits[i] = in.readLong();
      }
    }
    return bs;
  }
returns true if both sets have the same bits set
ambry-utils/src/main/java/com/github/ambry/utils/OpenBitSet.java