zip - How can I uncompress a gzip file in javascript? -
i have gotten arraybuffer
data (called s follows consist of many blocks) our serve side,the blob generated follows:
var blob=new blob([s.slice(4,82838)]);
but blob have made gzip data;how can uncompress in javascript? have tried zip.js
didn't work?(and still puzzled why doesn't work). please tell me method un-compress blob,thank you. (my english poor,sorry)
in browser have used pako
you may like..
var reader = new filereader(); reader.onload = function(event) { var result = pako.inflate(event.target.result, { to: 'string' }); console.log(result); } reader.readasarraybuffer(file));
if environment nodejs have zlib capabilities
Comments
Post a Comment