Search code examples
cerlangerlang-nif

What is the best way to represent a C array in Erlang?


What is the best way to represent a C array in Erlang? I plan on passing a C array to Erlang using NIF. The array is composed of bytes and I'll need to modify some of the bytes as the program runs. Any help is appreciated.


Solution

  • erlang is pretty good when dealing with binaries(essentially byte arrays right?)

    check it out here: http://www.erlang.org/documentation/doc-5.6/doc/programming_examples/bit_syntax.html