From b1fd887402e4577cbb630fc6517cf9cd6e0d7c8f Mon Sep 17 00:00:00 2001 From: stale Date: Sun, 29 May 2022 23:56:03 -0300 Subject: compression! also bumped edition --- assets/client.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'assets/client.js') diff --git a/assets/client.js b/assets/client.js index e50ea9d..7c89495 100644 --- a/assets/client.js +++ b/assets/client.js @@ -88,8 +88,9 @@ function connect() { } function acceptBoard(data) { - let vals = new Uint8Array(data); - board = Array.from(vals).reduce((s,c) => { + let dataarr = new Uint8Array(data); + let vals = fflate.inflateSync(dataarr); + board = vals.reduce((s,c) => { let v = String.fromCodePoint(c); if (v == ' ') { s = s + " "; -- cgit v1.2.3