public int Read(byte[] buffer, int offset, int count)
{
int n = _length - _position;
if (n > count) n = count;
if (n <= 0)
return 0;
if (n <= 8)
{
int byteCount = n;
while (--byteCount >= 0)
buffer[offset + byteCount] = _buffer[_position + byteCount];
}
else
Std.BlockCopy(_buffer, _position, buffer, offset, n);
_position += n;
return n;
}