protobi / js-xlsx

XLSX / XLSM / XLSB (Excel 2007+ Spreadsheet) / ODS parser and writer
http://oss.sheetjs.com/js-xlsx
Other
814 stars 416 forks source link

support compression #128

Open yeshm opened 5 years ago

Zhenyi-Wang commented 3 years ago

Can this acutually work?

Zhenyi-Wang commented 3 years ago

Friend you forgot to add compression: "DEFLATE" in the first four cases..

 switch (o.type) {
            case "base64":
                return z.generate({ type: "base64", compression: "DEFLATE" });
            case "binary":
                return z.generate({ type: "string", compression: "DEFLATE" });
            case "buffer":
                return z.generate({ type: "nodebuffer", compression: "DEFLATE" });
            case "file":
                return _fs.writeFileSync(o.file, z.generate({ type: "nodebuffer", compression: "DEFLATE" }));