Just to complete this thread (for the archives :), Deflater in the JDK 
has a... "feature" -- flush() is basically not implemented and thus 
nonfunctional on compressed streams. This is a known limitation (bug's 
parade mentions it as an 'enhancement request', although for most people 
who faced the problem it'll be a plain bug.

Anyway, the workaround is to use a custom deflater (such as zlib) and 
perform Z_SYNC_FLUSH which pads the compressed stream to a complete 
block and allows flushing the content. This way you can flush a partial 
compressed stream to the browser (for these DHTML lovers who like to 
play with JavaScript, for instance).

We implemented a fixed GZIP/Deflate compression based on JZlib and 
PJL-comp-filter (which in turn we changed slightly to compile under 
JDK1.4). If you're interested, sources are in Carrot2 SVN.

https://svn.sourceforge.net/svnroot/carrot2/trunk/carrot2/components/carrot2-util-gzip/

Dawid

Dawid Weiss wrote:
> 
> I believe both deflate and gzip (as well as zip) are included as servlet 
> filters in:
> 
> http://sourceforge.net/projects/pjl-comp-filter/
> 
> Dawid
> 
> Pascal Beis wrote:
>> Hi all,
>>
>> I'v added support for deflate encoding (next to gzip) to nutch. Is there
>> interest to
>> include this into the main source repository?
>>
>> Patch attached.
>>
>> Cheers
>>
>> Pascal
>>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nutch-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-developers

Reply via email to