daraosn / node-zip

217 stars 38 forks source link

Compression failure #4

Closed Bartvds closed 10 years ago

Bartvds commented 11 years ago

I tried to compress a file I have generated on disk, and it compresses without errors.

But when I try to extract it again node-zip throws a nasty error.If I write the zip to file then my WinRaR also won't extract it so it looks like the file corrupts in compression.

I'm on Windows Vista 64, running Node.js v0.10.10

I made a failing test for it here:

https://github.com/Bartvds/node-zip/blob/error/extraction_error/test/nodezip_spec.js#L42

Failures:

  1) nodezip when archiving a read file should be able to compress and extract content
   Message:
     Error: Bug : uncompressed data size mismatch
   Stacktrace:
     Error: Bug : uncompressed data size mismatch
    at Object.ZipEntry.readLocalPart (jszip/jszip-load.js:225:19)
    at Object.ZipEntries.readLocalFiles (jszip/jszip-load.js:425:18)
    at Object.ZipEntries.load (jszip/jszip-load.js:509:15)
    at Object.ZipEntries (jszip/jszip-load.js:341:15)
    at Object.JSZip.load (jszip/jszip-load.js:528:20)
    at Object.JSZip (jszip/jszip.js:38:12)
    at null.<anonymous> (D:\_Editing\github\node-zip\test\nodezip_spec.js:56:13)
    at jasmine.Block.execute (C:\Users\Bart\AppData\Roaming\npm\node_modules\jasmine-node\lib\jasmine-node/jasmine-1.3.1.js:1064:17)
    at jasmine.Queue.next_ (C:\Users\Bart\AppData\Roaming\npm\node_modules\jasmine-node\lib\jasmine-node/jasmine-1.3.1.js:2096:31)
    at jasmine.Queue.start (C:\Users\Bart\AppData\Roaming\npm\node_modules\jasmine-node\lib\jasmine-node/jasmine-1.3.1.js:2049:8)
abovethewater commented 11 years ago

Looks to be the same issue as https://github.com/cthackers/adm-zip/issues/57 in adm-zip. Anyone have any recommendation for a zip lib that works in node?

hyperlink commented 11 years ago

I'm running into the same issue with compressing a word document.

https://github.com/ctalkington/node-archiver compresses it without issues.

daraosn commented 10 years ago

Corruption issues have been solved as for version 1.1 of node-zip, if you find more bugs feel free to open another ticket.