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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -