/// <summary> /// Initializes an instance of a buffered range reader stream. /// </summary> /// <param name="rangeReader">The interface used for reading ranges of bytes.</param> /// <param name="length">The total length of the file reader by <paramref name="rangeReader"/>.</param> /// <param name="bufferSizeProvider">The interface used to determine what buffer sizes to use.</param> public BufferedRangeStream(IRangeReader rangeReader, long length, IBufferSizeProvider bufferSizeProvider) : base(length) { _rangeReader = rangeReader; _bufferSizeProvider = bufferSizeProvider; _buffer = new BlockMemoryStream(); BufferPosition = length; }
/// <summary> /// Initializes an instance of a unbuffered range reader stream. /// </summary> /// <param name="rangeReader">The interface used for reading ranges of bytes.</param> /// <param name="length">The total length of the file reader by <paramref name="rangeReader"/>.</param> public RangeStream(IRangeReader rangeReader, long length) : base(length) { _rangeReader = rangeReader; }