Optimized parameter encoder by reusing buffers