encode entry should reuse memory rather than alloc each time