write to the same buffer when encoding fields