I have a suspicion that using text/event-stream with CompressiomStream could cause delays in delivering events to consumers but I'm not sure that's true or not. It seems to me that after enqueing some event(s)/chunk(s) that the compression stream could be in a waiting state for more bytes to compress before it enques corresponding compressed chunk(s).
Is some flush() method needed in order to reliably send a compressed stream of events and to guarantee that individual events are not delayed?
Demo: https://dash.deno.com/playground/event-stream-example
I have a suspicion that using
text/event-streamwithCompressiomStreamcould cause delays in delivering events to consumers but I'm not sure that's true or not. It seems to me that after enqueing some event(s)/chunk(s) that the compression stream could be in a waiting state for more bytes to compress before it enques corresponding compressed chunk(s).Is some
flush()method needed in order to reliably send a compressed stream of events and to guarantee that individual events are not delayed?Demo: https://dash.deno.com/playground/event-stream-example