Erlang binary term codec and port interface. Modeled after Erlectricity.