title: Stream pass through
body: <p>Considered we have two methods:</p>
  
  <pre><code>Task DownloadFromAToStreamAsync(Stream destinationStream);
  Task UploadToBFromStreamAsync(Stream sourceStream);
  </code></pre>
  
  <p>Now we need to download content from A and upload it to B in a single operation.</p>
  
  <p>One of the solutions:</p>
  
  <pre><code>using (var stream = new MemoryStream())
  {
      await DownloadFromAToStreamAsync(stream);
      stream.Seek(0, SeekOrigin.Begin);
      await UploadToBFromStreamAsync(stream);
  }
  </code></pre>
  
  <p>But this solution requires the whole stream content to be loaded in memory.</p>
  
  <p>How to solve the task more efficiently?</p>