title: Handling big file stream (read+write bytes)
body: <p>The following code do :</p>
  
  <ol>
  <li>Read all bytes from an input file </li>
  <li>Keep only part of the file in <em>outbytes</em></li>
  <li>Write the extracted bytes in outputfile</li>
  </ol>
  
  <pre><code>byte[] outbytes = File.ReadAllBytes(sourcefile).Skip(offset).Take(size).ToArray();
  File.WriteAllBytes(outfile, outbytes);
  </code></pre>
  
  <p>But there is a limitation of ~2GB data for each step.</p>
  
  <p><strong>Edit:</strong> The extracted <code>byte</code>s size can also be <strong>greater than</strong> <code>2GB</code>.</p>
  
  <p><strong>How could I handle big file ?</strong> What is the best way to proceed with good performances, regardless of size ? </p>
  
  <p>Thx !</p>