A simple encode-decode tools.