mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-18 01:07:22 +00:00
Use wasm zlib decompression @devcat
This commit is contained in:
@@ -7,4 +7,4 @@ export {
|
||||
isWebSocketPongEvent,
|
||||
} from "https://deno.land/std@0.67.0/ws/mod.ts";
|
||||
export type { WebSocket } from "https://deno.land/std@0.67.0/ws/mod.ts";
|
||||
export { inflate } from "https://deno.land/x/zlib.es@v1.0.0/mod.ts";
|
||||
export { decompress as inflate } from "https://unpkg.com/@evan/wasm@0.0.9/target/zlib/deno.js";
|
||||
|
||||
@@ -109,7 +109,7 @@ export async function createBasicShard(
|
||||
}
|
||||
|
||||
if (message instanceof Uint8Array) {
|
||||
message = new TextDecoder().decode(inflate(message as Uint8Array));
|
||||
message = new TextDecoder().decode(inflate(message, 9));
|
||||
}
|
||||
|
||||
if (typeof message === "string") {
|
||||
|
||||
Reference in New Issue
Block a user