import zlib


def complexity(s):
    """Compress string and return the size of the compression."""
    s = s.encode("utf-8")  # Python 3 fix.
    compr = zlib.compress(s)
    c = float(len(compr))
    return c