public int Read(long offset, byte[] buffer, int index, int count)
{
if (offset < 0L) throw new ArgumentOutOfRangeException("offset");
if (buffer == null) throw new ArgumentNullException("buffer");
if (index < 0 || index + count > buffer.Length) throw new ArgumentOutOfRangeException("index");
if (count < 0) throw new ArgumentOutOfRangeException("count");
if (offset >= _wrapper.EofOffset) return 0;
var startIdx = EnsureAvailable(offset, ref count, false);
Buffer.BlockCopy(_data, startIdx, buffer, index, count);
return count;
}