Encoding and decoding Erlang API for variable-length unsigned integer (or simply uintvar)