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
Regardless of ADO.NET drivers where we can get UTF8 directly out (#31216), we can optimize this by using Encoding.CreateTranscodingStream over a simple Stream to read the string as raw bytes:
Span<byte>buffer=// buffer to read intovar jsonValue ="{}";MemoryMarshal.Cast<char,byte>(jsonValue.AsSpan(0,Math.Min(jsonValue.Length,buffer.Length/2))).CopyTo(buffer);
Thanks to @NinoFloris for pointing out all the above.
Regardless of ADO.NET drivers where we can get UTF8 directly out (#31216), we can optimize this by using Encoding.CreateTranscodingStream over a simple Stream to read the string as raw bytes:
Thanks to @NinoFloris for pointing out all the above.
Originally posted by @roji in #31160 (comment)
The text was updated successfully, but these errors were encountered: