6public static class EncodingExtensions
18 if (
chars.Length <= 1048576)
40 if (
chars.IsSingleSegment)
54 if (
chars.IsSingleSegment)
80 if (
chars.IsSingleSegment)
109 byte[]
array3 =
new byte[num];
122 if (encoding ==
null)
130 if (
bytes.Length <= 1048576)
144 if (encoding ==
null)
152 if (
bytes.IsSingleSegment)
162 if (encoding ==
null)
166 if (
bytes.IsSingleSegment)
188 if (encoding ==
null)
192 if (
bytes.IsSingleSegment)
249 while (!
chars.IsEmpty);
290 while (!
bytes.IsEmpty);
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
virtual void Convert(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed)
int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
int GetCharCount(byte[] bytes, int index, int count)
int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, bool flush)
virtual void Convert(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, int byteCount, bool flush, out int charsUsed, out int bytesUsed, out bool completed)
int GetByteCount(char[] chars, int index, int count, bool flush)
static string GetString(this Encoding encoding, in ReadOnlySequence< byte > bytes)
static long GetBytes(this Encoding encoding, in ReadOnlySequence< char > chars, IBufferWriter< byte > writer)
static long GetChars(this Encoding encoding, in ReadOnlySequence< byte > bytes, IBufferWriter< char > writer)
static void Convert(this Decoder decoder, in ReadOnlySequence< byte > bytes, IBufferWriter< char > writer, bool flush, out long charsUsed, out bool completed)
static void Convert(this Encoder encoder, ReadOnlySpan< char > chars, IBufferWriter< byte > writer, bool flush, out long bytesUsed, out bool completed)
static int GetChars(this Encoding encoding, in ReadOnlySequence< byte > bytes, Span< char > chars)
static void Convert(this Decoder decoder, ReadOnlySpan< byte > bytes, IBufferWriter< char > writer, bool flush, out long charsUsed, out bool completed)
static byte[] GetBytes(this Encoding encoding, in ReadOnlySequence< char > chars)
static int GetBytes(this Encoding encoding, in ReadOnlySequence< char > chars, Span< byte > bytes)
static long GetBytes(this Encoding encoding, ReadOnlySpan< char > chars, IBufferWriter< byte > writer)
static long GetChars(this Encoding encoding, ReadOnlySpan< byte > bytes, IBufferWriter< char > writer)
static void Convert(this Encoder encoder, in ReadOnlySequence< char > chars, IBufferWriter< byte > writer, bool flush, out long bytesUsed, out bool completed)
virtual int GetCharCount(byte[] bytes)
virtual byte[] GetBytes(char[] chars)
virtual Decoder GetDecoder()
virtual Encoder GetEncoder()
virtual char[] GetChars(byte[] bytes)
virtual int GetByteCount(char[] chars)
unsafe string GetString(byte *bytes, int byteCount)