Entirely possible I'm missing something but is the...
# squarelibraries
a
Entirely possible I'm missing something but is there not a way to create an
okio.Buffer
directly from a
ByteArray
without a copy / call to
write(source: ByteArray)
? It seems like an API is missing to transfer ownership of a
ByteArray
and internally create a
Segment
from the given array for the buffer to use.
z
I think you could only do what you’re asking if the ByteArray exactly matched the Segment size, which is kind of an implementation detail. I’m guessing it would be a sharper edge than it’s worth?