44 {
46 {
47 bytesConsumed = 0;
48 bytesWritten = 0;
50 }
52 {
54 {
55 int num = utf8.Length & -4;
57 int num2 = num;
59 if (
length < maxDecodedFromUtf8Length - 2)
60 {
62 }
63 byte* srcBytes = ptr;
64 byte* destBytes = ptr2;
65 byte* ptr3 = ptr + (uint)num;
66 byte* ptr4 = ptr + (uint)num2;
67 if (num2 >= 24)
68 {
69 byte* ptr5 = ptr4 - 45;
71 {
73 if (srcBytes == ptr3)
74 {
75 goto IL_029d;
76 }
77 }
78 ptr5 = ptr4 - 24;
80 {
82 if (srcBytes == ptr3)
83 {
84 goto IL_029d;
85 }
86 }
87 }
88 int num3 = (isFinalBlock ? 4 : 0);
89 num2 = ((
length < maxDecodedFromUtf8Length) ? (
length / 3 * 4) : (num - num3));
91 ptr4 = ptr + (uint)num2;
92 while (true)
93 {
94 if (srcBytes < ptr4)
95 {
96 int num4 =
Decode(srcBytes, ref reference);
97 if (num4 >= 0)
98 {
100 srcBytes += 4;
101 destBytes += 3;
102 continue;
103 }
104 }
105 else
106 {
107 if (num2 != num - num3)
108 {
109 goto IL_02b3;
110 }
111 if (srcBytes == ptr3)
112 {
113 if (!isFinalBlock)
114 {
115 if (srcBytes == ptr + utf8.
Length)
116 {
117 break;
118 }
119 bytesConsumed = (int)(srcBytes - ptr);
120 bytesWritten = (int)(destBytes - ptr2);
122 }
123 }
124 else
125 {
126 uint num5 = ptr3[-4];
127 uint num6 = ptr3[-3];
128 uint num7 = ptr3[-2];
129 uint num8 = ptr3[-1];
132 num9 <<= 18;
133 num10 <<= 12;
134 num9 |= num10;
135 byte* ptr6 = ptr2 + (uint)
length;
136 if (num8 != 61)
137 {
140 num11 <<= 6;
141 num9 |= num12;
142 num9 |= num11;
143 if (num9 >= 0)
144 {
145 if (destBytes + 3 <= ptr6)
146 {
148 destBytes += 3;
149 goto IL_028c;
150 }
151 goto IL_02b3;
152 }
153 }
154 else if (num7 != 61)
155 {
157 num13 <<= 6;
158 num9 |= num13;
159 if (num9 >= 0)
160 {
161 if (destBytes + 2 <= ptr6)
162 {
163 *destBytes = (byte)(num9 >> 16);
164 destBytes[1] = (byte)(num9 >> 8);
165 destBytes += 2;
166 goto IL_028c;
167 }
168 goto IL_02b3;
169 }
170 }
171 else if (num9 >= 0)
172 {
173 if (destBytes + 1 <= ptr6)
174 {
175 *destBytes = (byte)(num9 >> 16);
176 destBytes++;
177 goto IL_028c;
178 }
179 goto IL_02b3;
180 }
181 }
182 }
183 goto IL_02f2;
184 IL_028c:
185 srcBytes += 4;
187 {
188 break;
189 }
190 goto IL_02f2;
191 IL_02b3:
192 if (!(num != utf8.
Length && isFinalBlock))
193 {
194 bytesConsumed = (int)(srcBytes - ptr);
195 bytesWritten = (int)(destBytes - ptr2);
197 }
198 goto IL_02f2;
199 IL_02f2:
200 bytesConsumed = (int)(srcBytes - ptr);
201 bytesWritten = (int)(destBytes - ptr2);
203 }
204 goto IL_029d;
205 IL_029d:
206 bytesConsumed = (int)(srcBytes - ptr);
207 bytesWritten = (int)(destBytes - ptr2);
209 }
210 }
211 }
static unsafe int Decode(byte *encodedBytes, ref sbyte decodingMap)
static int GetMaxDecodedFromUtf8Length(int length)
static ReadOnlySpan< sbyte > DecodingMap
static unsafe void Ssse3Decode(ref byte *srcBytes, ref byte *destBytes, byte *srcEnd, int sourceLength, int destLength, byte *srcStart, byte *destStart)
static unsafe void WriteThreeLowOrderBytes(byte *destination, int value)
static unsafe void Avx2Decode(ref byte *srcBytes, ref byte *destBytes, byte *srcEnd, int sourceLength, int destLength, byte *srcStart, byte *destStart)
static new bool IsSupported
static new bool IsSupported