Client side data compress/decompress? [closed]

僤鯓⒐⒋嵵緔 提交于 2019-12-05 18:52:32

There is this open-source Javascript compression library, by Pierre curto : https://github.com/pierrec/node-lz4

Googling around, I also found this zlib implementation (not tested by me) : http://nodejs.org/api/zlib.html

You may also try JSZip. To run it in browser you just have to download and include dist/jszip.js or dist/jszip.min.js.

This is actively supported and supports a wide variety of browsers including everyone's favorite IE6/7/8!

Usage (from their docs):

var zip = new JSZip();

zip.file("Hello.txt", "Hello World\n");

var img = zip.folder("images");
img.file("smile.gif", imgData, {base64: true});

var content = zip.generate({type:"blob"});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!