You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sébastien Geindre <se...@meteo.fr> on 2008/02/18 16:50:12 UTC
GZIP Stream Generator
hi all,
Have you ever heard about a king of stream generator that could rread a
gzip compress xml data flow, gunzip it and generate sax events ?
Does this kind of generator exist ?
Thanks
Sébastien.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: GZIP Stream Generator
Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Sébastien Geindre pisze:
> Grzegorz Kossakowski a écrit :
>> Sébastien Geindre pisze:
>>
>>> hi all,
>>>
>>> Have you ever heard about a king of stream generator that could rread a
>>> gzip compress xml data flow, gunzip it and generate sax events ?
>>>
>>> Does this kind of generator exist ?
>>>
>>
>> Is this data stored in gzipped file? If so, we have a zip: protocol in
>> Cocoon that probably would be
>> helpful for you.
>>
> no, not really.
> Imagine a client pushing xml data to a web service, it could push
> multipart/x-gzip data instead of txt/xml
>
> In my use cases, xml data could be heavy.
> So instead of StreamGenerator which handle xml flow of data posted by
> the client.
> I need a GZipStreamGenerator which could hanlde a gzip stream of xml
> data....
If you need to handle gzipped POST request then I agree with Daniel's suggestion to take this job
out of Cocoon scope. If it can't be done with mod_deflate then it's probably a good idea to create a
servlet filter or something like that.
I don't think that messing with such low-level details like body compression in Cocoon components is
a good idea.
--
Grzegorz Kossakowski
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: GZIP Stream Generator
Posted by Sébastien Geindre <se...@meteo.fr>.
Grzegorz Kossakowski a écrit :
> Sébastien Geindre pisze:
>
>> hi all,
>>
>> Have you ever heard about a king of stream generator that could rread a
>> gzip compress xml data flow, gunzip it and generate sax events ?
>>
>> Does this kind of generator exist ?
>>
>
> Is this data stored in gzipped file? If so, we have a zip: protocol in Cocoon that probably would be
> helpful for you.
>
no, not really.
Imagine a client pushing xml data to a web service, it could push
multipart/x-gzip data instead of txt/xml
In my use cases, xml data could be heavy.
So instead of StreamGenerator which handle xml flow of data posted by
the client.
I need a GZipStreamGenerator which could hanlde a gzip stream of xml
data....
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: GZIP Stream Generator
Posted by Grzegorz Kossakowski <gk...@apache.org>.
Sébastien Geindre pisze:
> hi all,
>
> Have you ever heard about a king of stream generator that could rread a
> gzip compress xml data flow, gunzip it and generate sax events ?
>
> Does this kind of generator exist ?
Is this data stored in gzipped file? If so, we have a zip: protocol in Cocoon that probably would be
helpful for you.
--
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: GZIP Stream Generator
Posted by Dev at weitling <de...@weitling.net>.
>>> Have you ever heard about a king of stream generator that could
>>> rread a gzip compress xml data flow, gunzip it and generate sax
>>> events ?
>>>
>>> Does this kind of generator exist ?
>>
>> I don't know. But if you want to code something like this, it could
>> probably better as a Reader, so the contained data doesn't have to be
>> XML.
> i am not familiar to Reader.
For 2.1 look here at the org.apache.cocoon.reading.Reader interface
(http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/reading/Reader.html)
> Could you explain why it should be better to do with reader ?
The reader is more generic. With a GZipReader you could ungzip every
kind of data, not only xml. The standard generator could have it's data
provided by this reader. And readers could even be chained.
> Do not forget that client will sent GZIP file as stream...
Uhm, the client posts a gzipped xml file? What about Alexander Daniel's
post? So you could have the compression transparent and have to do now
work on it.
Florian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: GZIP Stream Generator
Posted by Sébastien Geindre <se...@meteo.fr>.
Dev at weitling a écrit :
> Hi Sébastien,
>
>> Have you ever heard about a king of stream generator that could rread
>> a gzip compress xml data flow, gunzip it and generate sax events ?
>>
>> Does this kind of generator exist ?
>
> I don't know. But if you want to code something like this, it could
> probably better as a Reader, so the contained data doesn't have to be
> XML.
i am not familiar to Reader.
Could you explain why it should be better to do with reader ?
Do not forget that client will sent GZIP file as stream...
>
> Bye,
> Florian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: GZIP Stream Generator
Posted by Dev at weitling <de...@weitling.net>.
Hi Sébastien,
> Have you ever heard about a king of stream generator that could rread
> a gzip compress xml data flow, gunzip it and generate sax events ?
>
> Does this kind of generator exist ?
I don't know. But if you want to code something like this, it could
probably better as a Reader, so the contained data doesn't have to be XML.
Bye,
Florian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: GZIP Stream Generator
Posted by Sébastien Geindre <se...@meteo.fr>.
I agree !
This is the best way to do what i want...
Thanks all !
Alexander Daniel a écrit :
> On 18.02.2008, at 16:50, Sébastien Geindre wrote:
>> Have you ever heard about a king of stream generator that could rread
>> a gzip compress xml data flow, gunzip it and generate sax events ?
>>
>> Does this kind of generator exist ?
>
> I never heard of such a generator. If you are already using Apache
> httpd you might consider to compress the whole request body and use
> mod_deflate for input decompression [1]?
>
> Alex
>
> [1] http://httpd.apache.org/docs/2.2/mod/mod_deflate.html#input
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: GZIP Stream Generator
Posted by Alexander Daniel <al...@gmx.at>.
On 18.02.2008, at 16:50, Sébastien Geindre wrote:
> Have you ever heard about a king of stream generator that could
> rread a gzip compress xml data flow, gunzip it and generate sax
> events ?
>
> Does this kind of generator exist ?
I never heard of such a generator. If you are already using Apache
httpd you might consider to compress the whole request body and use
mod_deflate for input decompression [1]?
Alex
[1] http://httpd.apache.org/docs/2.2/mod/mod_deflate.html#input
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org