At http://idpf.org/epub/30/spec/epub30-ocf.html under “3.3 OCF ZIP Container Media Type Identification” it says that the “mimetype file additionally must be neither compressed nor encrypted, and there must not be an extra field in its ZIP header.”
Is there a way to zip a folder but specify that this one file not be compressed? Or 2) Is there a way to zip a folder without compressing anything, but still have it be a valid zip (epub) file? Or 3) Could I zip the folder normally and then replace the compressed mimetype file with an uncompressed version? And 4) WTF? Why would they require a non-compressed file in a compressed folder? That seems strange to me, as I’ve never run into such a requirement before.
Thanks for any help or insight on this. My goal is to easily zip a folder and change its extension from “.zip” to “.epub” via Applescript to get a valid epub file.
Thanks. The mimetype file has no extension to filter by, so I tried:
set fn to “HTML5_CSS3_Book.zip”
set dn to “HTML5_CSS3_Book”
do shell script “zip -r -0 ~/Desktop/” & fn & " " & “~/Desktop/” & dn
This zipped the folder and the result said 0% compression on all files, but the byte count shown in the Finder Info Window differed for the folder and the zip that I made. But it seems like this would probably work.