lz-string压缩后字符串使用encodeURIComponent编码报错

http://pieroxy.net/blog/pages/lz-string/index.html

这是一个string压缩的工具

在用这个工具压缩后使用encodeURIComponent编码报错

Uncaught URIError: URI malformed

压缩用compressToUTF16这个方法会压缩成另一种可用的编码

原文地址:https://www.cnblogs.com/zqiong/p/6497934.html