@staticmethod
def gzip_deflate(response, text):
    encoding = response.info().get('Content-Encoding')
    if (encoding in ('gzip', 'x-gzip', 'deflate')):
        if (encoding == 'deflate'):
            return zlib.decompress(text, (- zlib.MAX_WBITS))
        else:
            return gzip.GzipFile('', 'rb', 9, io.BytesIO(text)).read()
    return text
@staticmethod
def gzip_deflate(response, text):
    encoding = response.info().get('Content-Encoding')
    if (encoding in ('gzip', 'x-gzip', 'deflate')):
        if (encoding == 'deflate'):
            return zlib.decompress(text, (- zlib.MAX_WBITS))
        else:
            return gzip.GzipFile(, 'rb', 9, io.BytesIO(text)).read()
    return text