def gzipped(content):
    """
    test if content is gzipped by magic num.
    first two bytes of gzip stream should be 0x1F and 0x8B,
    the third byte represent for compress algorithm, always 8(deflate) now
    """
    if content is not None and len(content) > 10 and ord(content[0:1]
        ) == 31 and ord(content[1:2]) == 139 and ord(content[2:3]) == 8:
        return True
    return False
