Datastar v1 server-sent event encoder and streaming compression wrapper.
The bytes and defaults follow sdk/datastar-sdk-config-v1.json and the
reference generator. gzip is implemented with Erlang :zlib and every
event is emitted with a synchronous deflate flush.
Summary
Functions
Finish a finite stream and release compression state.
Encode events as per-event flushed chunks plus the compression trailer.
Datastar SSE response headers. Connection is emitted only for HTTP/1.x.
Negotiate the supported stream encodings (gzip and identity).
Open an SSE response and initialize its negotiated streaming encoder.
Send and flush each event on a Plug chunked response.
Write one event and synchronously flush its compression frame.
Write raw SSE bytes (used for comment heartbeats) with a stream flush.
Types
Functions
Finish a finite stream and release compression state.
Encode events as per-event flushed chunks plus the compression trailer.
Datastar SSE response headers. Connection is emitted only for HTTP/1.x.
Negotiate the supported stream encodings (gzip and identity).
Open an SSE response and initialize its negotiated streaming encoder.
Send and flush each event on a Plug chunked response.
Write one event and synchronously flush its compression frame.
Write raw SSE bytes (used for comment heartbeats) with a stream flush.