Encode/Decode values in a structure.
