Read data in FileStream into a generic Stream
c#, stream
Solution
Stephen Toub discusses a stream pipeline in his MSDN .NET matters column here. In the article he describes a CopyStream() method that copies from one input stream to another stream. This sounds quite similar to what you're trying to do.
Problem
What's the most efficient way to read a stream into another stream? In this case, I'm trying to read data in a Filestream into a generic stream. I know I could do the following: 1. read line by line and write the data to the stream 2. read chunks of bytes and write to the stream 3. etc I'm just trying to find the most efficient way. Thanks