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)
To create a tar.gz it could look like:
.aggregate(Zip).compress(Gzip)
Does that make sense?
Greetings
Christian
Vladimir Okhotnikov schrieb:
I agree that unmarshal().compression() sounds better. OTOH, probably
unmarshal().compressed() would be even better.
I'm not sure now whether I should try creating the patch as I planned,
because what Christian suggests (extracting camel-compress) is obviously
better and superior solution. If he wishes to do it, I'll be happy to
contribute whatever I can.
It is also an interesting point the other Christian raised - about an
archives containing many files. It would be great to support tar.gz/tar.bz2
archives as well. In fact, this is not even specific to compression - I
would say that a generic data format concept should support
spitting/aggregation - consider MIME emails with attachments for example.
I'm not that much in EAP background and camel internal design (yet?) to
suggest how that aspect might be implemented however.
Claus Ibsen-2 wrote:
But it may be a bit weird doing
.unmarshal().compress() to do de-compressing :)
So maybe .compression() is a better name for it?
But is that much different that .unmarshal().zip() as it will also
de-compress using zip.
For now I like option #3 the best.
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
--
Christian Schneider
---
http://www.liquid-reality.de