refactor: native zlib support (#10316)

Revert "revert: refactor: native zlib support (#10314)"

This reverts commit 4ea73bb64e.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Danial Raza
2024-06-03 00:51:26 +02:00
committed by GitHub
parent 17d4c78fde
commit 94cc02a258
4 changed files with 160 additions and 63 deletions

View File

@@ -50,7 +50,10 @@ const manager = new WebSocketManager({
intents: 0, // for no intents
rest,
// uncomment if you have zlib-sync installed and want to use compression
// compression: CompressionMethod.ZlibStream,
// compression: CompressionMethod.ZlibSync,
// alternatively, we support compression using node's native `node:zlib` module:
// compression: CompressionMethod.ZlibNative,
});
manager.on(WebSocketShardEvents.Dispatch, (event) => {