users@jersey.java.net

Re: [Jersey] fastinfoset and gzip

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 25 Jan 2010 09:54:00 +0100

On Jan 21, 2010, at 9:38 PM, Tatu Saloranta wrote:

> On Thu, Jan 21, 2010 at 4:00 AM, Paul Sandoz <Paul.Sandoz_at_sun.com>
> wrote:
>> Hi Florian,
>> Is there any additional output logged? for example:
>> A message body writer for Java type...
>> The GZIP filter is generic so it should not really matter what the
>> content
>> to be GZIP'ed is.
>
> I have a related question: would it be easy to add support for
> alternate compression codecs?
> Results I have seen with LZF (used by H2 DB, added to Voldemort) are
> very encouraging,

Any pointers to results?


> and I would be interested in making that work with
> Jersey too. But have not had time to see how easy it would be to do.
>


See the code for the GZIP filters.

Server:

http://fisheye4.atlassian.com/browse/jersey/trunk/jersey/jersey-server/src/main/java/com/sun/jersey/api/container/filter/GZIPContentEncodingFilter.java?r=HEAD


Client:

http://fisheye4.atlassian.com/browse/jersey/trunk/jersey/jersey-client/src/main/java/com/sun/jersey/api/client/filter/GZIPContentEncodingFilter.java?r=HEAD


The above filters use Accept-Content-Encoding and Content-Encoding and
key off the "gzip" value. So you could use, or define, something
similar for LZF.

Hth,
Paul.