mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 17:30:07 +00:00
Merge pull request #131 from Skillz4Killz/wasm-zlib
Use wasm zlib decompression @devcat
This commit is contained in:
2
deps.ts
2
deps.ts
@@ -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