modify version info in enc/dec

same as #1332 for master.