Avoid copying data in a buffer by using several deflate() calls

Reduce data movements.