push some code to EncodeTo and DecodeFrom