20

I am unzipping a file with approximately 3 million single text files - the zip-file itself is around 12 GB in size. It's not multi-part - it's just one large zip file btw. I do not have the original data - all I have is the zipped file which means I cannot try to zip the content again (just so you know).

The problem is that as I unzip, at some point, I get

..
file #1207565:  bad zipfile offset (local header sig):  9570252890
file #1207566:  bad zipfile offset (local header sig):  9570254437
file #1207567:  bad zipfile offset (local header sig):  9570255044
file #1207568:  bad zipfile offset (local header sig):  9570256141
file #1207569:  bad zipfile offset (local header sig):  9570256786
file #1207570:  bad zipfile offset (local header sig):  9570257539
..

This does not seem to affect every subfolder or file respectively in the archive but for a lot of them the process seems to fail.

At this point it's hard for me to guess if the packing or the unpacking is the problem

Are there any workarounds I could try on my side?

2 Answers2

19

I ran into the same problem - a huge zip file with a lot of files - and unzip choked trying to unpack it. A possible solution is to use java archiver. Just unpack your stuff with jar xvf file.zip

Daria
  • 445
6

I just wanted to copy the comment into an answer, although I had to use the "try harder" -FF option to get it to work:

Suggestion online and via man pages is to use: zip -F original.zip --out fixed.zip and then try to extract fixed.zip as normal...