ByteBuffer has its position set correctly after encoding.
Merge pull request #31 from jerrinot/improvements/byte-buffer-position-set-while-encoding

ByteBuffer has its position set correctly after encoding.