External Term Format
Introduction#
External Term Format is a binary format used to communicate to outside world. You can use it with any language through ports, drivers or NIF. BERT (Binary ERlang Term) can be used in other languages.
Using ETF with Erlang
binary_to_term().
Using ETF with C
Initializing data structure
#include <stdio.h>
#include <string.h>
#include <ei.h>
Encoding number
#include <stdio.h>
#include <ei.h>
int
main() {
}