You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, when receiving data from a mutable CharSequence, one has to use sink.writeString(chars.toString()), which may be inefficient (copying data to create a String, just to then encode it again as UTF-8 bytes in the buffer).
It would be nice to have a Sink.write(CharSequence) (or Sink.writeUtf8(CharSequence)) extension so we can efficiently transfer characters from a CharSequence into a Buffer via UTF-8 encoding.
The text was updated successfully, but these errors were encountered:
At the moment, when receiving data from a mutable
CharSequence
, one has to usesink.writeString(chars.toString())
, which may be inefficient (copying data to create aString
, just to then encode it again as UTF-8 bytes in the buffer).It would be nice to have a
Sink.write(CharSequence)
(orSink.writeUtf8(CharSequence)
) extension so we can efficiently transfer characters from aCharSequence
into aBuffer
via UTF-8 encoding.The text was updated successfully, but these errors were encountered: