docs: static final CouponHashSet heapifySet(final Memory mem) {
      final int lgConfigK = extractLgK(mem);
      final TgtHllType tgtHllType = extractTgtHllType(mem);
  
      final CurMode curMode = extractCurMode(mem);
      final int memArrStart = (curMode == CurMode.LIST) ? LIST_INT_ARR_START : HASH_SET_INT_ARR_START;
      final CouponHashSet set = new CouponHashSet(lgConfigK, tgtHllType);
      set.putOutOfOrderFlag(true);
      final boolean memIsCompact = extractCompactFlag(mem);
      final int couponCount = extractHashSetCount(mem);
      int lgCouponArrInts = extractLgArr(mem);
      if (lgCouponArrInts < LG_INIT_SET_SIZE) {
        lgCouponArrInts = computeLgArr(mem, couponCount, lgConfigK);
      }
      if (memIsCompact) {
        for (int i = 0; i < couponCount; i++) {
          set.couponUpdate(extractInt(mem, memArrStart + (i << 2)));
        }
      } else { //updatable
        set.couponCount = couponCount;
        set.lgCouponArrInts = lgCouponArrInts;
        final int couponArrInts = 1 << lgCouponArrInts;
        set.couponIntArr = new int[couponArrInts];
        mem.getIntArray(HASH_SET_INT_ARR_START, set.couponIntArr, 0, couponArrInts);
      }
      return set;
    }