Re: Zip/Unzip - the Minimalist Version for EPUB

On Wed, Jun 4, 2014 at 1:57 AM, Toman, Vojtech <vojtech.toman@emc.com> wrote:
> I like the simplicity of this proposal. The only reservation I have is that - unless I missed something - it sacrifices the ability to create zip archives directly from documents flowing through the pipeline: you have to export everything to the file system (or a location that can be represented by a URI) before applying p:zip. But on a second thought, maybe it is the correct way to go: it surely makes p:zip much simpler as it does not have to deal with XML serialization of the input documents, base64 encoding, base URIs etc. It is these things that are the main source of complexity (both from the specification and usage point of view) in the previous versions of p:zip, IMHO.

I've been thinking about that too.  I'm not quite sure how to address
this because you need pairs of information.  You need a sequence of
entries and their metadata (e.g. path, compression, etc.).  Maybe the
right thing to do is to say that there will be a more complex version
in the future of a different name.

>
> Some other random thoughts:
> - How can you control the compression level etc. in p:zip?

Based on what I know about this, we can add more attributes to the
c:entry element to control this.

> - What if p:unzip had a non-primary output port that would always contain the manifest, instead of having the manifest-only option?

Interesting idea.  I'll try it out.

> - Can p:zip-extract handle non-XML files? If so, how would that work? (I assume the user would have to tell p:zip-extract the media type of the entry or something like that.)

It could act the same as the p:http-request step and output c:data
somehow.  I would prefer to leave that as implementation defined until
we solidify our story about non-XML content.

I don't think we'll publish a "final" version of this note until we
have made enough progress on V2 to know that it is compatible with the
future.


-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Wednesday, 4 June 2014 16:48:05 UTC