code: static String preambleToString(final Memory mem) {
      final int preLongs = getAndCheckPreLongs(mem);  // make sure we can get the assumed preamble
  
      final Family family = Family.idToFamily(mem.getByte(FAMILY_BYTE));
  
      switch (family) {
        case RESERVOIR:
        case VAROPT:
          return sketchPreambleToString(mem, family, preLongs);
        case RESERVOIR_UNION:
        case VAROPT_UNION:
          return unionPreambleToString(mem, family, preLongs);
        default:
          throw new SketchesArgumentException("Inspecting preamble with Sampling family's "
                  + "PreambleUtil with object of family " + family.getFamilyName());
      }
    }
docs: Returns a human readable string summary of the preamble state of the given Memory.
  Note: other than making sure that the given Memory size is large
  enough for just the preamble, this does not do much value checking of the contents of the
  preamble as this is primarily a tool for debugging the preamble visually.
  
  @param mem the given Memory.
  @return the summary preamble string.