gzip-js icon indicating copy to clipboard operation
gzip-js copied to clipboard

I'm getting a broken file

Open vadimt2 opened this issue 4 years ago • 0 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)`

vadimt2 avatar Nov 27 '20 21:11 vadimt2