How do I perform a fast copy of the bytes of a ByteBuffer into another larger ByteBuffer (at non-zero offset) in Dart?
There are slow ways to do this. One is to cast each to a Uint8List and copy over one index at a time. Another is to cast into each into a Uint8List, get an iterator for the first, and call setRange()
on the second.
I'm thinking there ought to be a more direct way that asks the Dart API to speedily copy a byte sequence from one buffer to the other. The API can natively optimize this copy. If not, what's the fastest way to do this?