docs: static boolean checkPreLongsFlagsCap(final int preambleLongs, final int flags, final long memCapBytes) {
      final boolean empty = (flags & EMPTY_FLAG_MASK) > 0; //Preamble flags empty state
      final int minPre = Family.QUANTILES.getMinPreLongs(); //1
      final int maxPre = Family.QUANTILES.getMaxPreLongs(); //2
      final boolean valid = ((preambleLongs == minPre) && empty) || ((preambleLongs == maxPre) && !empty);
      if (!valid) {
        throw new SketchesArgumentException(
            "Possible corruption: PreambleLongs inconsistent with empty state: " + preambleLongs);
      }
      checkHeapFlags(flags);
      if (memCapBytes < (preambleLongs << 3)) {
        throw new SketchesArgumentException(
            "Possible corruption: Insufficient capacity for preamble: " + memCapBytes);
      }
      return empty;
    }