6341887: Inflater can't handle ByteBuffer (original) (raw)

Zhong Yu zhong.j.yu at gmail.com
Tue Mar 13 21:21:19 PDT 2012


I'd really appreciate that. I wrote a gzip filter in an nio system with Deflater. Most APIs use ByteBuffer, it's a little odd to have to convert to/from byte[].

Performance wise, we may need to copy input data from a ByteBuffer to a byte[], and we definitely need to copy output data byte[] to a direct ByteBuffer (for socket). But these extra copying doesn't really matter since Deflater throughput is much slower than memory copying throughput. Not sure about Inflater though.

Zhong Yu

On Tue, Mar 13, 2012 at 3:50 PM, Martin Kirst <martin.kirst at s1998.tu-chemnitz.de> wrote:

Hi,

I'm interested in contribute some work to openJdk. I found the Sun BUG:  6341887 "Inflater.setInput(), Inflater.inflate() can't handle ByteBuffer". After digging a little in the mailing archives I found nothing. After successfully building JDK8 from source, I would like to go ahead and code some patches. Are there any ideas around? Pros/Cons? Regards  Martin PS: According to the contribution guideline,  I'm not asking for support but for some discussion ;-)



More information about the nio-dev mailing list