python decompress http response gzip and deflate Content-Encoding

deflate与gzip解压的方法几乎相同,源码如下: