ldoc-etf
Decode one complete Erlang external term at the trusted local artifact boundary; this is not an isolation boundary for hostile ETF.
decode/1function
decode/1Decode BYTES as exactly one complete Erlang external term.
A trailing byte or decoder badarg returns {error, invalid_etf}; otherwise the decoded term is returned as {ok, Term}. ETF decoding may allocate trusted atoms and resources, so this boundary is not a hostile-input sandbox. It performs no file IO and executes no target module code.