String (int percent) { int objects = 3178 * percent / 100; String speed = "4.18 MiB | 223 KiB/s"; return "Receiving objects: " + percent + "% (" + objects + "/3178), " + speed + doneStr(percent == 100); }