void CommitDiscard()
{
if (_discardCount >= _data.Length || _discardCount >= _end)
{
// we have been told to discard the entire buffer
_baseOffset += _discardCount;
_end = 0;
}
else
{
// just discard the first part...
Buffer.BlockCopy(_data, _discardCount, _data, 0, _end - _discardCount);
_baseOffset += _discardCount;
_end -= _discardCount;
}
_discardCount = 0;
}