Skip to content

Instantly share code, notes, and snippets.

View dbezrukov's full-sized avatar
🎯
Focusing

Dmitry Bezrukov dbezrukov

🎯
Focusing
  • Customuse
  • London
View GitHub Profile
@dbezrukov
dbezrukov / lzuint8array.js
Created March 24, 2022 16:31 — forked from JobLeonard/lzuint8array.js
Uint8Array to LZ-string and back
const LZuint8Array = (function () {
/*
basic ranges of printable UTF16 values (as found in LZ-string):
[32, 127), [160, 55296), [63744, 65536)
We also have filter out string characters like:
" (34)
' (39)
` (44)
(Forward tick is safe: ´ (96))
So: