public static long estimateSize(String string) {
    return string == null ? 0 : (54 + string.getBytes().length);
  }
Utilities to estimate the size of in-memory objects.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/MemoryEstimator.java