I am going to ask for something I could not find on Stackoverflow. I am doing some Django, and I've recently discovered that I can stream the HTTP output using a generator. The output of a page is perfect for a normal case, however I wanted to stream the page output using GZip compression.
I've tried using the simple zlib.compress function, to no avail. The function generates small gzip files.
I want return small chunks of data as they are processed, as a string. Those chunks should form the content of a Gzipped file. How one would do this ? Thanks.