17 if (num2 <= 0 || num2 > num)
31 for (i = 0; i <
count; i += num)
46 for (i = 0; i <
buffer.Length; i += num)
59 long num = stream.Length -
stream.Position;
60 if (size < 0 || size > num)
static byte Min(byte val1, byte val2)
static int TryReadAll(this Stream stream, Span< byte > buffer)
static unsafe void CopyTo(this Stream source, byte *destination, int size)
static int TryReadAll(this Stream stream, byte[] buffer, int offset, int count)
const int StreamCopyBufferSize
static int GetAndValidateSize(Stream stream, int size, string streamParameterName)
static void Copy(int[] source, int startIndex, IntPtr destination, int length)
static string StreamTooLarge
static string UnexpectedStreamEnd