6341887: Inflater can't handle ByteBuffer
Alan Bateman
Alan.Bateman at oracle.com
Wed Mar 14 01:24:50 PDT 2012
On 14/03/2012 04:21, Zhong Yu wrote:
> :
>
> 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.
If it's a direct buffer there shouldn't be any additional copying when
using a SocketChannel.
-Alan.
More information about the nio-dev
mailing list