def is_gzipped(response):
 ctype = response.headers.get('Content-Type', '')
 cenc = response.headers.get('Content-Encoding', '').lower()
 return (_is_gzipped(ctype) or (_is_octetstream(ctype) and (cenc in ('gzip', 'x-gzip'))))

def is_gzipped ( response ) : ctype = response . headers . get ( 'Content-Type' , '' ) cenc = response . headers . get ( 'Content-Encoding' , '' ) . lower ( ) return ( _is_gzipped ( ctype ) or ( _is_octetstream ( ctype ) and ( cenc in ( 'gzip' , 'x-gzip' ) ) ) )
return true if the response is gzipped .