@NotNull
  @Contract(pure = true)
  public static String formatFileSize(long fileSize, @NotNull String unitSeparator, int rank, boolean fixedFractionPrecision) {
    if (fileSize < 0) throw new IllegalArgumentException("Invalid value: " + fileSize);
    if (fileSize == 0) return '0' + unitSeparator + 'B';
    if (rank < 0) {
      rank = rankForFileSize(fileSize);
    }
    double value = fileSize / Math.pow(1000, rank);
    String[] units = {"B", "kB", "MB", "GB", "TB", "PB", "EB"};
    DecimalFormat decimalFormat = new DecimalFormat("0.##");
    if (fixedFractionPrecision) {
      decimalFormat.setMinimumFractionDigits(2);
    }
    return decimalFormat.format(value) + unitSeparator + units[rank];
  }
@NotNull
  @Contract(pure = true)
  public static String formatFileSize(long fileSize, @NotNull String unitSeparator, int rank, boolean fixedFractionPrecision)