This adds support for zstd-stream compression through configuration of the
:gateway_compression configuration option.
This will optionally use the :ezstd library to decompress received payloads from
Discord allowing for some potential savings on payload size.
This also moves the ws_state to be agnostic and references the compression
context as compress_ctx instead of the previous zlib_ctx.
We add an optional dependency for :ezstd. I have not made this mandatory as it
requires natively built functions and as such I cannot guarantee how
cross-platform it is or in what environments it will build.
zstd-stream compression is documented upstream by discord/discord-api-docs#6877.
This adds support for zstd-stream compression through configuration of the
:gateway_compression
configuration option.This will optionally use the
:ezstd
library to decompress received payloads from Discord allowing for some potential savings on payload size.This also moves the ws_state to be agnostic and references the compression context as
compress_ctx
instead of the previouszlib_ctx
.We add an optional dependency for
:ezstd
. I have not made this mandatory as it requires natively built functions and as such I cannot guarantee how cross-platform it is or in what environments it will build.zstd-stream
compression is documented upstream by discord/discord-api-docs#6877.