def human_bytes_fraction(num, total, suffix='B'):
    """ Convert a number to bytes to a human-readable form"""
    for unit in ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']:
        if abs(total) < 1024.0:
            return '%3.1f/%3.1f%s%s' % (num, total, unit, suffix)
        num /= 1024.0
        total /= 1024.0
    return '%.1f%.1f%s%s' % (num, total, 'Yi', suffix)
