Determines which copy routine to use based on the number of bytes to be copied.
(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count)
| 48 | /// Determines which copy routine to use based on the number of bytes to be copied. |
| 49 | /// </summary> |
| 50 | internal static void Copy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count) |
| 51 | { |
| 52 | if (count > CopyThreshold) |
| 53 | { |
| 54 | Buffer.BlockCopy(src, srcOffset, dst, dstOffset, count); |
| 55 | } |
| 56 | else |
| 57 | { |
| 58 | int stop = srcOffset + count; |
| 59 | for (int i = srcOffset; i < stop; i++) |
| 60 | { |
| 61 | dst[dstOffset++] = src[i]; |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | /// <summary> |
| 67 | /// Reverses the order of bytes in the array |