Hi I was wondering if there’s any prior art for co...
# io
c
Hi I was wondering if there’s any prior art for copying a
kotlinx.io.Source
into an
okio.Sink
? I’m currently creating an intermediate
ByteArray
to write the bytes to then writing those bytes to the
okio.Sink
, but I’m wondering if there’s a better way
f
Hey! Providing a proper interop with Okio is in our library stabilization roadmap, but until it‘s not implemented yet one can either use kx-io‘s unsafe API and Okio‘s Cursor API to copy data without an intermediate array, or implement Okio‘s Source interface and wrap kx-io‘s RawSource into it.
👍 1
c
Thanks! I’ll check out the unsafe API for now