Compress Strings with lz‑string
lz-string by pieroxy.
It’s fast, and it weighs just a little over 4KB if you run it through something like Terser. I’ve tweaked it ever so slightly for my needs, but it should still be 100% compatible with the original. You can play with it below.