download zip files by use of reader in c#
<p>I have been working on this application that enables user to log in into another website, and then download specified file from that server. So far I have succeeded in logging on the website and download the file. But everything ruins when it comes to zip files.</p>

<p>Is there any chunk of code that could be helpful in reading the .zip files byte by byte or by using stream reader?</p>

<p>I m using <code>downloadfile()</code> but its not returning the correct zip file.</p>

<p>I need a method by which I can read zip files. Can I do it by using <code>ByteReader()</code></p>

<p>The code used to download zip file is</p>

<pre><code>string filename = "13572_BranchInformationReport_2012-05-22.zip";
            string filepath = "C:\\Documents and Settings\\user\\Desktop\\" + filename.ToString();
            WebClient client = new WebClient();
            string user = "abcd", pass = "password";
            client.Credentials = new NetworkCredential(user, pass);
            client.Encoding = System.Text.Encoding.UTF8;
            try
            {
                client.DownloadFile("https://web.site/archive/13572_BranchInformationReport_2012-05-22.zip", filepath);
                Response.Write("Success");
            }
            catch (Exception ue)
            {
                Response.Write(ue.Message);
            }
</code></pre>

<p>Thanks in advance.</p>
