def b2h(n):
    """Convert bytes int into human friendly string format.

    >>> b2h(10000)
    '9.8 KB'
    >>> b2h(100001221)
    '95.4 MB'
    """
    t = "{0:.2f} {1}".format
    symbols = ("KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")
    prefix = {s: 1 << (i + 1) * 10 for i, s in enumerate(symbols)}
    for s in reversed(symbols):
        if n >= prefix[s]:
            value = float(n) / prefix[s]
            return t(value, s)
    return t(n, "B")