-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems to unzip file / support zip64 locator format #104
Comments
the lost attachment ... |
It seems that PKWARE has changed its published standards.
So far the zziplib can read a ZIP64 central directory but it does not read a ZIP64 extras block. The real bug here is the fact that the file you provided does NOT provide a ZIP64 central directory (magic PK\6\6) but only a normal ZIP central directory (magic PK\6\5) so that the use of a ZIP64 extras block is atleast unintended .... as the usage of 0xFFFF as an extension marker was defined for the ZIP64 file format. It could be implemented however. |
After a bit more debugging I can see that the ZIP64-trailer is not used but instead there is a ZIP64-locator (PK\6\7). The pkware appnote documentation says that it was introduced in version 6.2 in 2004/2005. Bewildering as it may seem but the zziplib is older (going back to the 1990ies). I did check if I can implement the functionality but quite some logic needs to be changed here, so it is a real feature request instead of just a bug fix. I am sorry but this will not come around anytime soon. |
Nevertheless – thanks for the work done so far. Is an open spec downloadable? Have found it. For others who search it: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT |
Yes, that's it - when pkware did create the first zip.exe they were shipping the package with a APPNOTE.TXT file which did describe (parts of) the file format. That name has stuck referring to the standardisation proposal later. Here's the official archive = https://support.pkware.com/home/pkzip/developer-tools/appnote/application-note-archives |
I have a zip archive with only one compressed file in it. Using unzip it is possible to uncompress it. Using zziplib it is not possible because the dirent of this file is as follows:
(gdb) p dirent
$4 = {z_magic = "PK\001\002", z_encoder = {version = "-", ostype = ""}, z_extract = {version = "-", ostype = ""}, z_flags = "\b", z_compr = "\b", z_dostime = {time = "\353S", date = "GQ"}, z_crc32 = "|#\301\215", z_csize = "\377\377\377\377",
z_usize = "\377\377\377\377", z_namlen = "\034", z_extras = "\034", z_comment = "\000", z_diskstart = "\000", z_filetype = "\000", z_filemode = "\000\000\000", z_offset = "\377\377\377\377"}
It is possible to list the content, but it is not possible to open the compressed file, because z_offset is -1.
Attached the file in question. It is from the sftp side of ENTSOE-E. All their compressed files have the same problem.
The text was updated successfully, but these errors were encountered: