def is_probably_gzip(response):
    """
    Determine if a urllib response is likely gzip'd.

    :param response: the urllib response
    """
    return (response.url.endswith('.gz') or
            response.getheader('Content-Encoding') == 'gzip' or
            response.getheader('Content-Type') == 'application/x-gzip')