[erlang-questions] What is the best way to parse complex erlang terms in port drivers?

Richard O'Keefe ok@REDACTED
Thu Jun 7 04:12:25 CEST 2012


Zhemzhitsky Sergey <Sergey_Zhemzhitsky <at> troika.ru>
asked about the difference between the eterm interface
and the ei interface.

My understanding of this is that the eterm interface
lets you manipulate Erlang terms, while the ei interface
lets you manipulate the (serialised) binary representation
of terms.

eterm: walk around/generate unpacked trees without ever
       going through binaries
ei:    sequentially generate/parse packed binaries
       without going through trees

Does this answer the question?  Why was it hard to see in
the documentation?  I thought the first couple of paragraphs
of www.erlang.org/doc/man/{erl_eterm,ei}.html made it pretty
clear.




More information about the erlang-questions mailing list