Merge pull request #126 from Skillz4Killz/revert-124-zlib

Revert "improve perf of zlib inflating"
This commit is contained in:
chroventer
2020-10-02 01:28:54 -07:00
committed by GitHub
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ export type { WebSocket } from "https://deno.land/std@0.67.0/ws/mod.ts";
export { encode } from "https://deno.land/std@0.67.0/encoding/base64.ts";
export { delay } from "https://deno.land/std@0.67.0/async/delay.ts";
export { decompress as inflate } from "https://unpkg.com/@evan/wasm@0.0.9/target/zlib/deno.js";
export { inflate } from "https://deno.land/x/zlib.es@v1.0.0/mod.ts";
export {
connectWebSocket,
isWebSocketCloseEvent,
+1 -3
View File
@@ -107,9 +107,7 @@ export async function createBasicShard(
}
if (message instanceof Uint8Array) {
message = new TextDecoder().decode(
inflate(message as Uint8Array) as Uint8Array,
);
message = new TextDecoder().decode(inflate(message as Uint8Array));
}
if (typeof message === "string") {