Open
Description
When using Flask Streaming capabilities, flask-compress gathers all the data with get_data() and returns everything at once, breaking the "streaming" paradigm.
You may integrate streaming compression as described in this answer (for deflate here) :
https://stackoverflow.com/a/44387566/254061
def generate_zip():
compressor = zlib.compressobj()
for x in range(10000):
chunk = compressor.compress(f"this is my line: {x}\n".encode())
if chunk:
yield chunk
yield compressor.flush()
Metadata
Metadata
Assignees
Labels
No labels