how can I efficiently copy a Kotlin ByteArray into...
# kotlin-native
z
how can I efficiently copy a Kotlin ByteArray into a pointer to the first byte of an array?
e
you could try
Copy code
byteArray.usePinned {
    platform.posix.memcpy(ptr, it.addressOf(0), byteArray.length)
}
z
Oh that should work, good idea