View Single Post
Old 12-14-2015, 09:22 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
1) UTF-16 is like UTF-8 except it takes up more space. On the theory that if you use a lot of Chinese/Japanese characters it will actually come out to less space.
Seriously, just use UTF-8

2) Correct.

3&4) The only rule is that the mimetype file must be first, and uncompressed.
You can use e.g. advzip after-the-fact to recompress it with zopfli for space-saving -- advzip will NOT try to compress the mimetype, since its a) too small, and b) it doesn't recompress file that were stored without ANY compression.
Whatever other program you heard of probably did more or less the same thing, but with a particular affiliation of brand loyalty.

5) calibre's editor. Or else Sigil, but I am more fond of calibre. They do all the paperwork for you.
Failing that, it's simple with zip.exe -- the appropriate incantations are:
Code:
# Add mimetype without compression.
zip.exe -X0 C:\path\to\ebook.epub mimetype
# Add all files other than mimetype and platform-specific crap,
# using zip's maximum compression settings.
zip.exe -rDX9 C:\path\to\ebook.epub * -x "thumbs.db" -x mimetype

Last edited by eschwartz; 12-14-2015 at 09:28 PM.
eschwartz is offline   Reply With Quote