View Single Post
Old 04-02-2020, 12:31 AM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,754
Karma: 169712580
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Jellby View Post
My base script:

Code:
zip -X0 "${FILENAME}.epub" mimetype
zip -X9Dr "${FILENAME}.epub" META-INF OEBPS
advzip -z -4 "${FILENAME}.epub"
Given that the mimetype file is not to be compressed, why are you using the advzip with "insane" to compress the epub file? The only option for the mimetype would be 0 to store without compression.

To quote the epub 3.2 OCF ZIP Container specification:

4.3 OCF ZIP Container Media Type Identification

The first file in the OCF ZIP Container MUST be the mimetype file, which meets the following requirements:

The contents of the mimetype file MUST be the MIME media type [RFC2046] string application/epub+zip encoded in US-ASCII [US-ASCII].
The mimetype file MUST NOT contain any leading or trailing padding or white space.
The mimetype file MUST NOT begin with the Unicode byte order mark U+FEFF.
The mimetype file MUST NOT be compressed or encrypted, and there MUST NOT be an extra field in its ZIP header.
DNSB is offline   Reply With Quote