public static function readableFilesize($size, $precision = 2)
    {
        $result = $size;
        $index = 0;
        while ($result > 1024 && $index < count(self::$prefixes)) {
            $result = $result / 1024;
            $index++;
        }

        return sprintf('%1.'.$precision.'f %sB', $result, self::$prefixes[$index]);
    }