I'm getting a broken file
vadimt2 opened this issue · comments
I'm getting a weird text.
`
let options = {
level: 3,
name: file.name,
timestamp: 54554545
};
debugger
let test = gzip.zip(file, options);
var decoded="";
let testa = test.forEach(ch=>decoded+=(String.fromCharCode(ch)));`
I can't download the file because it's broken:
var saveByteArray = (function () {
var a = document.createElement("a");
document.body.appendChild(a);
return function (data, name) {
var blob = new Blob(data, {type: "octet/stream"}),
url = window.URL.createObjectURL(blob);
a.href = url;
a.download = name;
a.click();
window.URL.revokeObjectURL(url);
};
}());
saveByteArray([test], 'example.gz');
same here:
`
let options = {name: file.name};
let test = gzip.zip(file, options);
var blob=new Blob([test], {type: "application/gzip"});
saveAs(blob)`