From: <joe...@gm...> - 2001-10-08 14:05:30
|
Hello, you have done a good job, I use jazzlib as a replacement for java.util.zip (which does not work) for a Swing-based Zip tool. First let me allow the hint that Sun does not permit the usage of "java.util" packages for third parties. Maybe you get into trouble. Now my contribution. There is a bug in your java.util.ZipFile. According to www.pkware.com/support/appnote.html there can be variable-length comments at the end of the file. Your code assumes the central directory size is fixed, but it's not. Some "odd" Zips will fail with a ZipException "Missing end of central directory". Attached you find a util.ZipFile source file for your convenience. It fixes this bug by seeking backward from end of file minus minimum size of the central directory. All Zips I have are recognized now. My fix throws a "invalid zip or broken" if it fails to find the header signature. Cheers and continue your good work Jörg |