def file_size_format(num, suffix='B'):
    """Formats a file size into human readable

    :param num: size (bytes)
    :param suffix:

        - **B** is default and return bytes
        - or one of **Ki**, **Mi**, **Gi**, **Ti**, **Pi**', **Ei**, **Zi**

    :return: **`str`** with file size
    """
    for unit in ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']:
        if abs(num) < 1024.0:
            return '%3.1f%s%s' % (num, unit, suffix)
        num /= 1024.0
    return '%.1f%s%s' % (num, 'Yi', suffix)
