Re: Archive Module -revival

On 6 févr. 2014, at 20:08, Florent Georges <fgeorges@fgeorges.org> wrote:

>> 
>> As far as I know, order should be irrelevant in archive files (at
>> least in ZIP archives).
> 
>  The OCF spec[1] (the ePUB spec that defines how to package files
> together in a ZIP file) mandates the first entry to be "mimetype"
> entry, uncompressed, and containing "application/epub+zip".  This is
> an easy way to check this is actually intended to be an actual ePPUB
> file encoded as ZIP, without having to unzip the file (a bit like
> magic numbers in image files).
> 
>  I think that generating ePUB files is an important use case.

+1. Thanks for raising that use case.

There may be workarounds if the files are unordered (e.g. first create the archive with just the “mimetype" file, then update it with the remaining files), but it’s less convenient and the correctness would not be guaranteed by the spec.

Romain.

Received on Thursday, 6 February 2014 19:56:49 UTC