点击查看html编辑器说明文档

lz-string demoedit icon

|
|
Fork(复制)
|
|
作者:
lynn-ssk
提交反馈
嵌入
设置
下载
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ...
展开
</head>
<body>
            
            <script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/lz-string/1.4.4/lz-string.min.js" type="application/javascript"></script>
        
</body>
CSS
格式化
            
            
        
JS
格式化
            
            var sss = `{"id":"c_ZC8nZ0U6","type":"col","children":[{"id":"id_css","dargbarClass":"asHead","detail":{"type":"css"}},{"id":"id_html","dargbarClass":"asHead","detail":{"type":"html"}}]}`;
console.log(sss.length, sss)

var compressed = LZString.compress(sss);
console.log(compressed.length, compressed)

var compressed2 = LZString.compressToBase64(sss);
console.log(compressed2.length, compressed2)

var compressed3 = LZString.compressToUTF16(sss);
console.log(compressed3.length, compressed3)

// var compressed4 = LZString.compressToUint8Array(sss);
// console.log(compressed4.length, compressed4)
// console.log(new TextDecoder().decode(compressed4))
// console.log(String.fromCharCode.apply(null, compressed4))

var compressed5 = LZString.compressToEncodedURIComponent(sss);
console.log(compressed5.length, compressed5)

var compressed6 = encodeURIComponent(sss);
console.log(compressed6.length, compressed6)

        
预览
控制台
清空