epub compression clarified
Zip not only did, it's a nearly ISO standard.
Check RFC 1961
In fact if discussing compression methods it is better to refer to their own names instead of the names of file archive containers using said method, as we have seen, it might help avoid confusion.
So let's have a clean start from here on:
The metbod used in zip files (deflate) is used in several cases which can be roughly sorted in two groups:
The 1st uses not only the method, but the file structure too - in which case the file can be renamed to zip, altered and named back. This is correct for e.g. pkg files of some id shooter games and partly for epubs.
The 2nd uses the method to compress its data steams but doesn't necessarily follow zip file structure. PNGs are deflate compressed too.
7zip or: Here the mixing up began:
7z archives don't use the deflate method. They use lzma and are therefor out of discussion for epubs period.
The zips(!) produced by 7z use a more efficient DEFLATE implementation and are an option to consider.
This is why I pointed to: advancemame.sourceforge.net/comp-readme.html
It uses the same deflate implementation like 7zip. There you go: smaller yet epub spec-compliant zip files.
Doing a search on the topic I came across KZIP which is said to have an even higher deflate based compression than the above mentioned: advsys.net/ken/utils.htm
If it's still better than 7zips deflate, if it won't choke on the uncompressed mimetype file required by epub specifications I don't know but it sounds like worth trying.
As for your question why not to use solid archives like 7z: no long answer but some keywords: memory usage; decompression spee; dictionary size. Similar goes with your mp3 comparison: libvorbis or its smaller kin libtremor (being a lot less stable) need far more power than the small audio player offer. Haven't you never wondered why only the bigger ones do OGG?
Going back from your comparison with ebooks: How long did you say the file 'll need to open and how much RAM is needed for this!?
That's all dear Digit and I shall no longer distract you from reading the epub specifications which people present here and being far wiser on the subject than me suggested to you.
IMHO it's the best thing you can do, because randomly deleting stuff, while still hoping things don't get hopelessly f*d upis as far from an optimisation attempt, as amputation of private parts is from an weight loss therapy.
|