tarek
10/26/2019, 5:06 PMUInt8Array back to a Kotlin ByteArray than trivially ByteArray(uintArray.length) { uintArray[it] } ?diesieben07
10/28/2019, 8:40 AMByteArray is represented as Int8Array you can do the following to avoid the slow copying:
val uint8 = Uint8Array(10)
val int8 = Int8Array(uint8.buffer)
val byteArray = int8.unsafeCast<ByteArray>()
Note that if you do this they will continue to share contentsdiesieben07
10/28/2019, 8:41 AMval uint8 = Uint8Array(10)
val int8 = Int8Array(uint8.buffer.slice(0))
val byteArray = int8.unsafeCast<ByteArray>()