You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noted that Buffer is now built on top of Uint8Array, and have decided to make more extensive use of Uint8Array throughout my code rather than using Buffers (also to standardise compatibility with C++).
What I would like to do is modify some existing code that makes use of buffers, and get low-level access to the Uint8Array that holds the data. Is that possible purely using JavaScript, without doing any resource intensive operations like copying the buffer to a new array? How could it be done using C++?
The text was updated successfully, but these errors were encountered:
What I would like to do is modify some existing code that makes use of buffers, and get low-level access to the Uint8Array that holds the data.
Buffer is a Uint8Array, with a defined __proto__. e.g. in C++ doing args[0]->IsUint8Array() will return true. There something specific you're looking for?
I have noted that Buffer is now built on top of Uint8Array, and have decided to make more extensive use of Uint8Array throughout my code rather than using Buffers (also to standardise compatibility with C++).
What I would like to do is modify some existing code that makes use of buffers, and get low-level access to the Uint8Array that holds the data. Is that possible purely using JavaScript, without doing any resource intensive operations like copying the buffer to a new array? How could it be done using C++?
The text was updated successfully, but these errors were encountered: