Comments (9)
Here's some commandline info on fixing it ( http://ask.metafilter.com/157754/Mac-OS-X-Recovering-a-corrupted-zip-file )
Jaundiced-Outlook:Downloads Richard$ file Project.zip
Project.zip: Zip archive data, at least v1.0 to extract
Jaundiced-Outlook:Downloads Richard$ zip -F Project.zip --out ProjectFixed.zip
Fix archive (-F) - assume mostly intact archive
zip warning: bad archive - missing end signature
zip warning: (If downloaded, was binary mode used? If not, the
zip warning: archive may be scrambled and not recoverable)
zip warning: Can't use -F to fix (try -FF)
zip error: Zip file structure invalid (Project.zip)
Jaundiced-Outlook:Downloads Richard$ zip -FF Project.zip --out ProjectFixed.zip
Fix archive (-FF) - salvage what can
zip warning: Missing end (EOCDR) signature - either this archive
is not readable or the end is damaged
Is this a single-disk archive? (y/n): y
Assuming single-disk archive
Scanning for entries...
copying: Project/after.png
zip warning: no end of stream entry found: Project/after.png
zip warning: rewinding and scanning for later entries
zip warning: zip file empty
Jaundiced-Outlook:Downloads Richard$
from zip.js.
Thanks richardanaya for this detailed bug report!
Actually I fixed a bug related to "Data descriptor" signature recently. Did you use the latest version of zip.js?
from zip.js.
Just tried with latest git clone.
Same message and same output from zip -FF =)
from zip.js.
I do not see what is wrong with the end of central directory record...
Can you attach a lightweight zip file that you are not able to unzip? Are there some cases where the generated zip files can be unzipped without any issue?
EDIT: Can you also try to replace this code at line 792 of zip.js
header.view.setUint32(0, 0x0a000808);
with this one:
header.view.setUint32(0, 0x14000808);
(edit 2: changed 0x3d000808 to 0x14000808)
from zip.js.
Will do
from zip.js.
Thank you very much :)
That's the only way for me to know how to fix this issue...
from zip.js.
Edit! Correction, they all seem to be working!
I'm going to link a directory of tests, basically I just browse to the directory and add all the files using the "Create a zip file demo"
http://www.mediafire.com/?58dami1ka95sodi
Test 1: 1 image file
Test 2: 2 image files
Test 3: 1 .rtf file
Test 4: 4 image files
Pre-Fix
Test 1: Fails
Test 2: Succeeds
Test 3: Fails
Test 4: Succeeds
Post Fix:
Test 1: Succeeds
Test 2: Succeeds
Test 3: Succeeds
Test 4: Succeeds
from zip.js.
Whoops, guess should wait til there is a code fix =)
from zip.js.
Yeah, I'll push it when I'll be back at home ;)
from zip.js.
Related Issues (20)
- [It took too much time the second time] entry getData HOT 10
- Security - CRITICAL - Unsafe dynamic method access HOT 8
- We need zip js for Angular 11 HOT 16
- RangeError [ERR_BUFFER_TOO_LARGE] occurs if the ZIP file contains a file larger than 4GB (ZIP64 format) HOT 4
- Excessive Password Prompts During Unzipping with forceZip64 and Password-Protected ZIP Creation HOT 3
- `Bun` support HOT 4
- Why doesn't this zip data work? HOT 2
- Feature: ZipReader and ZipWriter as Streams via .pipeThrough HOT 2
- Password HOT 1
- Safari 14.1.2 error -> ReferenceError: Can't find variable: zip HOT 5
- "TypeError: Cannot close a CLOSED writable stream" thrown after reading data from zip entry HOT 7
- Taking time to load HOT 3
- Range request optimalizations HOT 4
- I hope you can set the zip file comment HOT 2
- Corruption when zipping fast HOT 6
- Publish zip.js to the JSR HOT 3
- Corrupt zip file created using BlobReader on File object HOT 6
- Issues with the ZipReaderStream example HOT 2
- Cannot read properties of undefined (reading 'byteLength') HOT 1
- Zip streaming on Cloudflare Workers - WritableStream has been closed HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zip.js.