netty5/codec/src
Norman Maurer 4d2b78ca3c Reduce the memory copies in JdkZlibEncoder
Motivation:

At the moment we use a lot of unnecessary memory copies in JdkZlibEncoder. This is caused by either allocate a to small ByteBuf and expand it later or using a temporary byte array.
Beside this the memory footprint of JdkZlibEncoder is pretty high because of the byte[] used for compressing.

Modification:

- Override allocateBuffer(...) and calculate the estimatedsize in there, this reduce expanding of the ByteBuf later
- Not use byte[] in the instance itself but allocate a heap ByteBuf and write directly into the byte array

Result:

Less memory copies and smaller memory footprint
2014-06-26 11:12:19 +02:00
..
main/java/io/netty/handler/codec Reduce the memory copies in JdkZlibEncoder 2014-06-26 11:12:19 +02:00
test Fix buffer leaks in Bzip2Decoder(Test) 2014-06-26 17:48:32 +09:00