title: data is not saving properly in memory stream C#
body: <p>I am using HtmlAgilityPack and saving an html document in MemoryStream :</p>
  
  <pre><code>       MemoryStream ms = new MemoryStream();
         HtmlDocument doc = new HtmlDocument();
         doc.load(path);
         . 
         .
         doc.Save(ms);
  </code></pre>
  
  <p>Now the problem is that sometime the document saved fully and sometimes some contents of the document ( from end ) lost, it did`nt save with the document. Can anybody tell me why this is happening and how can i solve this? </p>