Please test the ZIP64 features - v1.7.1.7

Coordinator
Dec 20, 2008 at 11:51 PM
Edited Dec 22, 2008 at 2:12 PM
In the latest preview release of DotNetZip, I've implemented the ZIP64 extensions. 

The original Zip spec from PKWare allowed for a maximum of 65535 entries in a zip file; and for a max size of 4.2g of any one archive.  This worked when 640k was enough memory for anyone, but these limits are too low for many scenarios these days. 

PKWare made "ZIP64 extensions" to the spec, to raise those limits.   The problem is, not many tools or libraries implement those extensions, as far as I can tell.

I think I've implemented ZIP64 correctly in DotNetZip, but I don't have a good way of verifying correctness or compatibility/interoperability.  
Windows Explorer does not "do" ZIP64, nor do many third-party tools and libraries out there.  Some of the tools that claim to "do" ZIP64, seem to do it incorrectly.

So I need your help!  If  you are interested in ZIP64, please download v1.7.1.7 and try out the ZIP64 support in the library.  
There is a new property on the ZipFile - UseZip64WhenSaving.   You need to set it in your app to get a ZIP64 archive. The prior behavior - no ZIP64 support - is the default. 
Create a few archives.  Try opening them in other tools.  Or if you have a "known good" zip64 archive, try reading it with DotNetZip.   Let me know if it works for you.   If it does not work for you, I'd like to know specifically how it does not work.   Also, tell me if you think the interface makes sense. Is it usable?  Simple enough?  Is the documentation clear?

You can also take advantage of the ZIP64 format stuff using the command-line tools - zipit and unzip both support ZIP64 now.  And also, the winforms GUI Zip creator tool - it also will create a ZIP64 archive if you wish. 

Very interested in feedback.
Dec 21, 2008 at 8:27 AM
Edited Dec 21, 2008 at 8:34 AM
Below a collection of all errors or problems that I have see when using DotNetZip 1.7.1.7 :

- Using the WinForms application, when choosing "Self-extractor (Gui)" I get the error :
  "Exception while zipping : Errors compiling the extraction logic" (with "self-extractor (cmd) there is no problem)
  This is not related to Zip64 support, I get the error with or without Zip64 enabled.

- Latin1 chars are not correctly showed using last WinRAR and 7Zip version (also it seems that you use Unicode and it's not necessary => é char is in IBM437) :
  "Encoding utf-8
  Created at 2008-déc.-21 09:50:36 || WinForms Example for DotNetZip v1.7.1.7"

- When uncompressing a Zip64 file done with DotNetZip, I get some errors with 7Zip 4.62 :
  "Invalid compression method" for each compressed file.

- One hour is added to the modified date of all zipped files (comparing to archives done with 7Zip 4.62 and WinRAR 3.80)

- I have tried to use unzip.exe on the Zip64 archive "test2.zip" (about 5Go) (you can donwload the archive here : http://www.archive.org/details/test_zip64),
I have get the following error :
C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Examples\UnZip\bin\D
ebug>unzip "C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Examples
\UnZip\bin\Debug\test2.zip"
exception: Ionic.Utils.Zip.ZipException: C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Examples\UnZip\bin\Debug\test2.zip is not a valid zip file
---> Ionic.Utils.Zip.BadReadException:   ZipEntry::ReadHeader(): Inconsistent zip64 datasize at position 0x0000000028AC0049
   à Ionic.Utils.Zip.ZipEntry.ProcessExtraField(ZipEntry ze, Int16 extraFieldLength) dans C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Library\ZipEntry.cs:ligne 932
   à Ionic.Utils.Zip.ZipEntry.ReadHeader(ZipEntry ze, Encoding defaultEncoding) dans C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Library\ZipEntry.cs:ligne 796
   à Ionic.Utils.Zip.ZipEntry.Read(ZipFile zf, Boolean first) dans C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Library\ZipEntry.cs:ligne 976
   à Ionic.Utils.Zip.ZipFile.ReadIntoInstance_Orig(ZipFile zf) dans C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Library\ZipFile.cs:ligne 4514
   à Ionic.Utils.Zip.ZipFile.ReadIntoInstance(ZipFile zf) dans C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Library\ZipFile.cs:ligne 4457
   à Ionic.Utils.Zip.ZipFile.Read(String zipFileName, TextWriter statusMessageWriter, Encoding encoding, EventHandler`1 readProgress) dans C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Library\ZipFile.cs:ligne 3989
   --- Fin de la trace de la pile d'exception interne ---
   à Ionic.Utils.Zip.ZipFile.Read(String zipFileName, TextWriter statusMessageWriter, Encoding encoding, EventHandler`1 readProgress) dans C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Library\ZipFile.cs:ligne 3994
   à Ionic.Utils.Zip.ZipFile.Read(String zipFileName, TextWriter statusMessageWriter, Encoding encoding) dans C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Library\ZipFile.cs:ligne 3942
   à Ionic.Utils.Zip.ZipFile.Read(String zipFileName) dans C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Library\ZipFile.cs:ligne 3646
   à Ionic.Utils.Zip.Examples.UnZip.Main(String[] args) dans C:\Users\Dominique\Desktop\DotNetZip-src-v1.7.1.7\DotNetZip\Examples\UnZip\UnZip.cs:ligne 160

Thanks
Coordinator
Dec 21, 2008 at 1:15 PM
Dom,
thanks for the testing.

As I told you before, I cannot get to that zip file.   When I try to download it, I get a 404.

As for the problems you reported, The first one I've fixed.
I'll have to check out the other problems.
Coordinator
Dec 21, 2008 at 2:06 PM
Is there a way I can tell the 7zip archiver to create a zip64 archive?
I cannot figure out how to do that.
Dec 21, 2008 at 2:26 PM
Sorry, forgot that.

I have put this file in my FTP :
ftp://82.231.215.77:21

login : cheeso
no password.
Dec 21, 2008 at 2:28 PM
I haven't find how to expressely ask to make Zip64 archive with 7Zip too.

I think this automatically handled.
Coordinator
Dec 21, 2008 at 3:52 PM
Hey Dom, I'm having a problem here.

When I look at the 7zip archiver, and load one of the DotNetZip zipfiles into it, with the ZIP64 extensions in use, the file sizes for these files are all the same: 4294967295.  This is 0xFFFFFFFF, which, not coincidentally, is the marker value to be used when ZIP64 is in use.  It is not a real value.   A zip tool that supports ZIP64 is supposed to behave differently when it finds that value for a size.  The actual size is a 64-bit value stored elsewhere in the zip file.  But 7zip just displays the marker value.

The makers of 7zip claim to support ZIP64, but I don't see how to create one with the tool, and it does not seem to be properly handling the one that I created.
It may be handled automatically, as you suggest, but the problem is with ZIP64, there is a question of compatibility.  Therefore the tool ought to notify the user - "Hey this is going to be a ZIP64 archive, you will not be able to open it in Windows Explorer and other tools."   Because there is no warning, I suspect that maybe the ZIP64 support in 7zip is not as well thought out as we would hope.

Here's the challenge - I don't know of an authoritative source for ZIP64 compatibility.   Is the output from 7zip guaranteed to be correct?   If it is, then I would like to know how to create a ZIP64 with 7zip.  Is WinZIP the authoritative source?   Is there some other source?

I tried another toolkit (Perl's IO::Compression::Zip) and found errors there as well. The maintainer of that library confirmed the error. 

I can implement ZIP64, it is just a matter of metadata formats. 
But I don't know how to test for compatibility.

For now I will grab the giant zip file from your FTP (Thanks).  I will let you know!
Coordinator
Dec 21, 2008 at 3:59 PM
ok, I am transferring that test2.zip; my client predicts it will take 13 hours.
It would be a lot easier if I could generate a ZIP64 zip myself, here, and be confident that it was compliant.
Coordinator
Dec 21, 2008 at 8:12 PM
I made some changes and fixes.  I updated the release to v1.7.1.8. 

Notes:
It should work now with 7zip. 
I fixed the winforms GUI so that it can correctly compile the GUI SFX.
I fixed the time shift on the lastmod time.

About the Latin characters - I am not sure about this.
I use whatever setting you choose when creating a vanilla ZIP.  If you choose to create a self-extracting archive, then the Winforms tool will always select UTF-8 for the Encoding.  UTF-8 is a good idea, because it can encode anything.  The only reason you would not want to use UTF-8 is compatibility with the extractor tool.  Windows Explorer does not handle UTF-8 very well, for example.  But if you create a SFX, then DotNetZip will always be the library used to unpack the archive, by definition.  Which means, UTF-8 is always a safe choice.  For this reason, I force the use of UTF-8 when SFX is selected.  You will see that in the Winforms UI.   If you select a vanilla ZIP, then the Encoding goes back to whatever it was before.  So, yes, UTF-8 is used "unnecessarily" in this case, but it should be a safe and always correct choice.

If you do not select SFX (either GUI or CMD), then the Encoding for the resulting ZIP file will be whatever you set it to.  If you select UTF-8, then it will be UTF-8.  If you select something else, it will be what you select.

Have another look and see if it makes sense to you.

Finally, about the test2.zip - I am still downloading.  If you have a moment, could you retest with the latest v1.7 binaries?

Coordinator
Dec 22, 2008 at 5:33 AM
I never could download that zip file.  It kept timing out at the same point.  about 700mb.

Interested in your feedback.
Jan 6, 2009 at 12:24 AM
I tested using Ionic.Zip version 1.7.1.13.

I need to do more testing with extraction via Ionic.Zip; however, both Windows Explorer and 7Zip choak on the same files inside the archive.

When I went to create a new Archive in 7Zip I noticed that they support Deflate64 -- not Zip64 I wonder if potentially this is the issue.

I'll post back here additional information about using Ionic.Zip to do the extraction and see if the files that did NOT work with the other two methods do infact work if using Ionic.Zip as the extractor.

-Fuzz
Coordinator
Jan 6, 2009 at 12:41 AM
MMkay, great Fuzz.
good info to have is:
  - how did you create the archive - which tool, library, or program.
  - characterize the number of files and their size, and the aggregate size of the zip.  (1mb, 100mb, 5gb, etc)
  - any additional info like, UTF in use, ZIP64 in use, etc.
  - what you were doing (unzip, list, create zip, etc)  and what error occurred

I don't know if 7zip supports ZIP64.   I know that Windows Explorer does not.  If you try to open a ZIP64 file in Explorer, generally it will open and you will be able to browse the list of files, but not always.  And, even if you can "See" the files, you will not be able to extract some of them. 
 
-Cheez
Jan 6, 2009 at 3:16 AM
I'm looking at about ~6GB file.

Created by Ionic.Zip. Ion

List files works in explorer and 7Zip but extraction of certian files do not work. 7Zip reports the compression algorythm is not compatible, explorer gives a useless message.

I'll post back when i've had a chance to test the extraction from using the zip library.

Thanks,
~Nate
Not sent from an iPhone

-----Original Message-----
From: "Cheeso" <[email removed]>
To: [email removed]
Sent: 1/5/09 7:41 PM
Subject: Re: Please test the ZIP64 features - v1.7.1.7 [DotNetZip:42763]

From: Cheeso

MMkay, great Fuzz.
good info to have is:
  - how did you create the archive - which tool, library, or program.
  - characterize the number of files and their size, and the aggregate size of the zip.  (1mb, 100mb, 5gb, etc)
  - any additional info like, UTF in use, ZIP64 in use, etc.
  - what you were doing (unzip, list, create zip, etc)  and what error occurred

I don't know if 7zip supports ZIP64.   I know that Windows Explorer does not.  If you try to open a ZIP64 file in Explorer, generally it will open and you will be able to browse the list of files, but not always.  And, even if you can "See" the files, you will not be able to extract some of them. 
 
-Cheez

Coordinator
Jan 6, 2009 at 4:38 AM
Great!
When you created the file with Ionic.Zip, did you enable the ZIP64 extensions? I would think so, but want to check.

From: [email removed]
Sent: Monday, January 05, 2009 8:16 PM
To: [email removed]
Subject: Re: Please test the ZIP64 features - v1.7.1.7 [DotNetZip:42763]

From: fuzzzerd

I'm looking at about ~6GB file.

Created by Ionic.Zip. Ion

List files works in explorer and 7Zip but extraction of certian files do not work. 7Zip reports the compression algorythm is not compatible, explorer gives a useless message.

I'll post back when i've had a chance to test the extraction from using the zip library.

Thanks,
~Nate
Not sent from an iPhone

-----Original Message-----
From: "Cheeso" <[email removed]>
To: [email removed]
Sent: 1/5/09 7:41 PM
Subject: Re: Please test the ZIP64 features - v1.7.1.7 [DotNetZip:42763]

From: Cheeso

MMkay, great Fuzz.
good info to have is:
- how did you create the archive - which tool, library, or program.
- characterize the number of files and their size, and the aggregate size of the zip. (1mb, 100mb, 5gb, etc)
- any additional info like, UTF in use, ZIP64 in use, etc.
- what you were doing (unzip, list, create zip, etc) and what error occurred

I don't know if 7zip supports ZIP64. I know that Windows Explorer does not. If you try to open a ZIP64 file in Explorer, generally it will open and you will be able to browse the list of files, but not always. And, even if you can "See" the files, you will not be able to extract some of them.

-Cheez