TypedArray (e.g. Uint8Array) into BufRead/Read without memory copying #2780
-
I need Uint8Array in the form of BufRead or Read. I could just copy the whole memory using something like to_vec and construct some type of I think in order to do that I have to get the address to the mutable continuous memory block, probably in type of Is it possible? If so, how can I do it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You'll probably want to hold a |
Beta Was this translation helpful? Give feedback.
You'll probably want to hold a
js_sys::Uint8Array
and then develop your own abstraction around it (using methods injs-sys
to copy data in/out). Currently there's nothing built-in for this, however.