Link to home
Start Free TrialLog in
Avatar of Alexandre Takacs
Alexandre TakacsFlag for Switzerland

asked on

ZIP file format issue

Hello

We are experiencing some issues with third party generated  ZIP files.

Although WinZip or 7zip actually manage to unzip them (while complaining about format errors) Linux built-in utilities will silently (!) fail with them.

Although I have already raised the issue with the provider it would be very useful if someone with proper expertise could let me know exactly what's wrong with the files we receive (see attached exemple).
5a2fe9b0d9f22.zip
SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alexandre Takacs

ASKER

Thanks

That's pretty much how far I got. If anyone with more knowledge of ZIP format would chime in it will be appreciated!
This all depends on version of Linux you're using + version of unzip installed.

If you're using something recent, like Ubuntu Zesty or Artful, then the zip installed will utilize all new technologies, like support for large zipfiles + decryption + decompression of alternative zip compressor formats.

If you're using an old Linux, which will only have an old version of unzip available for install, then likely you'll have a good bit of trouble decompressing modern .zip files.
Avatar of Bill Prew
Bill Prew

While that's true for un*x, since the ZIP files are reported as corrupted using current versions of WinZip and 7-Zip on Windows, I would still be looking at the files themselves, I think they are the root of the problem.


»bp
You can also try the following command. The more recent the version of zip, the better this will work...

zip -FF broken.zip --out fixed.zip

Open in new window

Thanks for all the advices

I would still be very interested by some analysis of the file provided (ie what is actually wrong or questionable with it's structure)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks!
What I see so far is an unconfirmed start of data, which is a header issue. Also there is data after the end of the payload.
Is there a chance these are being moved by FTP in ascii mode? Or their zip program or temp file system is bad...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Linux zip does not support newer winzip formats.  Just install the 7zip command line and run that.
The ZIP isn't a "new" flavor of zip, looks to be a simple basic zip format.  No zip utility is going to be able to extract the Content.xml file, there seems to be corruption related to that.

Alexandre Takacs, have you been able to talk to the supplier of the zip?  Do they see the corruption on there end, or is it only after transmission to you?


»bp