Menu

#662 Can't compress epub

open
nobody
None
5
11 hours ago
11 hours ago
sharpchen
No

I was trying to compress epub contents using 7z, but it seems to fail with preserving file order

To compress a epub, it requires mimetype on top of the archive and without compression.
So I did

 # add mimetype on top
7zz a -mx0 -mtc=off -mcu=on -tzip foo.epub $mimetype
 # append rest files
7zz a -mx9 -mtc=off -mcu=on -tzip foo.epub <rest of files>

But If I inspect the archive, mimetype is always the last entry(same for reversing the previous operation)

$ unzip -v ./foo.epub | grep mimetype -n
309:      20  Stored       20   0%  05-08-25 08:10  00000000 mimetype

related issue: https://stackoverflow.com/questions/18824773/zip-an-epub-using-a-batch-file-and-7zip#comment27804477_18826216

Discussion


Log in to post a comment.