414 {
416 {
417 bytesConsumed = 0;
418 bytesWritten = 0;
420 }
422 {
424 {
428 byte* srcBytes = ptr;
429 byte* destBytes = ptr2;
430 byte* ptr3 = ptr + (uint)
length;
431 byte* ptr4 = ptr + (uint)num;
432 if (num >= 16)
433 {
434 byte* ptr5 = ptr4 - 32;
436 {
438 if (srcBytes == ptr3)
439 {
440 goto IL_0175;
441 }
442 }
443 ptr5 = ptr4 - 16;
445 {
447 if (srcBytes == ptr3)
448 {
449 goto IL_0175;
450 }
451 }
452 }
454 uint num2 = 0u;
455 ptr4 -= 2;
456 while (srcBytes < ptr4)
457 {
458 num2 =
Encode(srcBytes, ref reference);
460 srcBytes += 3;
461 destBytes += 4;
462 }
463 if (ptr4 + 2 == ptr3)
464 {
465 if (!isFinalBlock)
466 {
467 if (srcBytes != ptr3)
468 {
469 bytesConsumed = (int)(srcBytes - ptr);
470 bytesWritten = (int)(destBytes - ptr2);
472 }
473 }
474 else if (srcBytes + 1 == ptr3)
475 {
478 srcBytes++;
479 destBytes += 4;
480 }
481 else if (srcBytes + 2 == ptr3)
482 {
485 srcBytes += 2;
486 destBytes += 4;
487 }
488 goto IL_0175;
489 }
490 bytesConsumed = (int)(srcBytes - ptr);
491 bytesWritten = (int)(destBytes - ptr2);
493 IL_0175:
494 bytesConsumed = (int)(srcBytes - ptr);
495 bytesWritten = (int)(destBytes - ptr2);
497 }
498 }
499 }
static unsafe uint Encode(byte *threeBytes, ref byte encodingMap)
static unsafe void Avx2Encode(ref byte *srcBytes, ref byte *destBytes, byte *srcEnd, int sourceLength, int destLength, byte *srcStart, byte *destStart)
static unsafe uint EncodeAndPadOne(byte *twoBytes, ref byte encodingMap)
static unsafe void Ssse3Encode(ref byte *srcBytes, ref byte *destBytes, byte *srcEnd, int sourceLength, int destLength, byte *srcStart, byte *destStart)
static int GetMaxEncodedToUtf8Length(int length)
static ReadOnlySpan< byte > EncodingMap
static unsafe uint EncodeAndPadTwo(byte *oneByte, ref byte encodingMap)
static new bool IsSupported
static new bool IsSupported