Erlang Crockford Encoding and Decoding