<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>
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ... </head>
<body>
</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)
预览