'Generator for data coming from a chunked-encoded HTTP response.'

def _stream_helper(self, response, decode=False):

    if response.raw._fp.chunked:
        if decode:
            for chunk in json_stream(self._stream_helper(response, False)):
                (yield chunk)
        else:
            reader = response.raw
            while (not reader.closed):
                data = reader.read(1)
                if (not data):
                    break
                if reader._fp.chunk_left:
                    data += reader.read(reader._fp.chunk_left)
                (yield data)
    else:
        (yield self._result(response, json=decode))
