Page 1 of 1

handling non-standard zip file

Posted: 24 Jun 2007, 18:46
by SvA
Today a came across a zip file, which Salamander's Zip plugin did not manage to list or extract. It tests and extracts ok though with PKZip25 (PKWARE's PKZIP 2.50 command line utility) and also Windows XP handles it without any problem.

Unfortunately I cannot provide the archive to you, because it's contents are confidential. It's created by Lexware Financial Office, a wellknown German accounting software. I did take a look at its internal structure, though, and it appears to be somewhat unusual, actually even violating the zip file's description (appnote.txt by PKWARE).
  • The file starts with the central directory structure (list of file headers only). There are no file comments and no extra fields.
  • Following this the file data is stored each file with its local file header and a trailing data descriptor. Bit 3 in flags is set. Nevertheless, in the local file header only compressed size field is set to zero, uncompressed size is set according to the file, CRC is set to some unknown value different from the file's CRC. All of these values are correct in the data descriptor. The data descriptor ist stored using a signature.
  • Then, at the end of the file, the End of central dir record follows, pointing to the correct locations. There's a file comment present.
Could you please add support for zip files like that.

PS: unfortunately I do not have access to the application that created the archive, so I am unable to provide a sample with dummy data, nor even the exact version number of the program. But I think you should get the picture from my description and be able to adjust the plugin. Maybe someone reading this can provide a sample for you to test your modifications.