int (long fileSize) { if (fileSize < 0) throw new IllegalArgumentException("Invalid value: " + fileSize); return (int)((Math.log10(fileSize) + 0.0000021714778384307465) / 3); // (3 - Math.log10(999.995)) }