warp
warp copied to clipboard
WebSocket permessage-deflate extension support
Sec-WebSocket-Extensions: permessage-deflate
and such is available in Firefox and Chrome, and utilizing it natively would eliminate the need to load large JavaScript decompression libraries on the client-side. (Large as in about 28KB min-gzipped)
The native implementation in-browser is probably faster than Javascript codecs as well.
Ideally, this could be automatic, as the compression is transparent. However, it should also be able to signal to the user code that compression extensions are unavailable, so it could fallback and signal to load those aforementioned libraries.
The alternative would be to just continue doing it manually. I'm simply using flate2
and sending/receiving binary messages.
Perhaps this is more an issue for tokio-tungstenite?
Hi! yeah, see https://github.com/snapview/tungstenite-rs/pull/144
See https://github.com/snapview/tungstenite-rs/pull/235. To support warp
, something like https://github.com/seanmonstar/warp/compare/master...kazk:permessage-deflate