MINOR: compression: pass COMP_CT_EVENT to the algorithms for server-sent events
Server-sent events ("text/event-stream"), as emitted by AI and API
gateways, are made of small events that are flushed one at a time, each
of which repeats most of the previous one. Compressing them one at a time
without any history is useless, but an algorithm may handle them
differently if it knows about them.
select_compression_response_header() now sets the content type to the new
COMP_CT_EVENT when the Content-Type header starts with "text/event-stream".
Requests are left untouched: server-sent events only exist in responses,
and since an algorithm may need memory for this content type, clients
must not be able to force it. The algorithms don't make use of it yet and
treat it as COMP_CT_GENERIC.
This already improves the compression ratio for SSE to be below unity:
bytes in bytes out ratio
before: 227584 232303 102%
after: 227584 199829 88%