Impl decoder and encoder for IMessage