If you get a I/O Error – Invalid Zip File or Inconsistant Zip Archive error when validating an ePub file using – http://validator.idpf.org/
Download StuffIT Expander from the App Store, the only other tool you will need is terminal.
1. Rename the broken ePub with a .zip extension.
2. Using StuffIT Expander, unzip broken archive.
3. Open terminal and navigate to the correct directory where you expanded the archive.
4. Run the following commands in terminal:
- zip -X fixed.epub mimetype
- zip -rg fixed.epub META-INF -x \*.DS_Store
- zip -rg fixed.epub OPS -x \*.DS_Store
Note that the OPS folder is sometimes OEBPS, this must match the original folder structure.