POC for encoding and decoding