rf00 / minizip-asm.js

Minizip in javascript. Work with password. Demo:
https://rf00.github.io/minizip-asm.js/example/
Other
42 stars 17 forks source link

The zip size is more than than the actual size #1

Open tagqcmanager opened 6 years ago

tagqcmanager commented 6 years ago

Just testing out the implementation. My file is about 4K and when created a zip file using WinRar, its size becomes 1.7KB. However, with minizip, when I create the zip files, its size becomes 64KB, 16 times larger than the original file. Can you please check?

rf00 commented 6 years ago

It seems related to ioapi_mem.c in minizip library which used 64kb buffer size internally. You may try jszip instead, this libaray is mostly just for the minimal password functionality, which is not heavily tested and outdated. If you need something more precise, you will need to compile the latest version of minizip or libarchive via emscripten by yourself.

timrobinson33 commented 10 months ago

In my test, it looks like the file was padded out with nulls, but still seems to be accepted as a valid zip file.

I guess most of the time if you're zipping something it's because the original is quite large in which case the 64KB overhead isn't significant, so this isn't a showstopper for me