I'm trying to figure out how to enable deflate compression on the client with libwebsockets, for both send and receive.
Documentation seems sparse, I understand that I'd need to:
- Configure lws with
LWS_WITH_HTTP_STREAM_COMPRESSION
- Use
lws_http_compression_apply
???
I'm not clear on the second part - do I need to call this function twice, to enable compression support for both outgoing and incoming data? Is compression then optionally supported - and depends on what the server also supports - or mandatory (and will fail if the server doesn't support it)?
Any pointers would be appreciated.