def size2str(num, suffix='B'):
    """Convert size from bytes to human readable string."""
    for unit in ('', 'K', 'M', 'G', 'T'):
        if abs(num) < 1024.0:
            return '{:3.1f} {}{}'.format(num, unit, suffix)
        num /= 1024.0
    return '>1000 TB'