I want to compress a .gif file by using jszip in node js, the code is like this:
var fileContent = fs.readFileSync("loading.gif", 'base64');
zip.file('loading.gif', fileContent, {base64: true});
var data = zip.generate({type: 'nodebuffer', compression: 'DEFLATE'});
fs.writeFileSync( '/loading.zip', data, 'binary');
The code can run and the zip file can be generated. However, the .gif file can't be decompressed correctly.

I want to compress a .gif file by using jszip in node js, the code is like this:
The code can run and the zip file can be generated. However, the .gif file can't be decompressed correctly.
