Hmm,

I think you are right as the Zip API is not separate it makes sense to use only one DSL function. The question is then of course how would you name it?

Would you rather name the operation split(Zip) or decompress(Zip)? If the operation was named decompress the tar.gz example could be done like this:
decompress(GZip).decompress(Tar)
and zip would simply look like decompress(Zip)

Btw. In our scenario we had the requirement that the files from the zip had to be processed in a certain order. In our case the processing should be done in order of the filenames.
Any idea how this could be expressed?

Greetings

Christian

Vladimir Okhotnikov schrieb:
This would work nice for tar.gz, but not so nice for zip and other formats
which tend to combine aggregation and compression in one operation. The main
question is, what exactly should do split(Zip) and what decompress(Zip) in
your scenario?


Christian Schneider wrote:
How about using .compress to compress and .decompress to extract
something?

Could perhaps the notion of extracting several parts from a container be handled with the existing splitting component?
I imagine a 2 phase extraction like in tar.gz:
.decompress(Gzip).split(Tar)

or for a zip file:
.decompress(Zip).split(Zip)

--

Christian Schneider
---
http://www.liquid-reality.de





Reply via email to