How to read/write data to ArrayBuffer from C++ Node.js addon?

Viewed 2716

In short, I have an addon that completes an operation which results in a uint8_t array. I need to convert this array and its contents to an ArrayBuffer, and return that.

Conversely, the addon can also accept an ArrayBuffer as input, and I need to convert that, along with its contents, into a uint8_t array.

I am having trouble finding clear documentation on how to do so. I am new to Node, v8, addons, etc. If someone knows how to do this and could help me out that would be great.

1 Answers
Related