David Stolarsky
05/05/2019, 1:26 PMByteArray
to Swift Data
without copying every byte?Jurriaan Mous
05/05/2019, 3:05 PMactual fun encode(bytes: ByteArray) = memScoped {
NSData.create(
bytesNoCopy = bytes.toCValues().getPointer(this),
length = bytes.size.toULong()
).base64EncodedStringWithOptions(0)
}
David Stolarsky
05/06/2019, 1:02 AMDavid Stolarsky
05/06/2019, 1:24 AMKotlinByteArray
from swift. this looks much betterDavid Stolarsky
05/06/2019, 1:26 AMactual fun
on the Android side too or you're just doing swift?