full encode / decode round trip