Codex encode/decode object

Fixed compile errors
Tested CodecToString