shazow/urllib3 — pull request #159 by schlamar (2013-03-19 12:39:16+00:00)
Title: Support streaming decompression of HTTPResponse.

This PR will change HTTPResponse.read to support chunked reading (with `amt` parameter) in combination with `decode_content`. This quite useful if you want HTTPResponse to be a decompressed file-like object.

Additionally, it exposes `HTTPResponse._decode_content` as public member so you control the decompression behavior after creation. This will allow request's `response.raw` to be a decompressed file-like object by simply setting `response.raw.decode_content = True`.

The streaming decompression logic is a merge of the previous logic and `requests.utils.stream_decompress`.