<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unzip zip resources file in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/unzip-zip-resources-file/m-p/8318304#M24952</link>
    <description>&lt;P&gt;If I understand correctly, you are looking for reading entries in-memory of an archive.&lt;/P&gt;
&lt;P&gt;For example, I have .zip file which wraps a *.txt file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; static void Main(string[] args)
        {
            using (FileStream zipToOpen = new FileStream(@"D:\dotnetsnips\inmemroryArchive\reader.zip", FileMode.Open))
            {
                using (ZipArchive archive = new ZipArchive(zipToOpen, ZipArchiveMode.Read))
                {
                    foreach (ZipArchiveEntry entry in archive.Entries)
                    {
                        if (entry.FullName.EndsWith(".txt", StringComparison.OrdinalIgnoreCase))
                        {
                            using (StreamReader reader = new StreamReader(entry.Open()))
                            {
                                Console.WriteLine(reader.ReadLine());
                            }
                        }

                    }
                }
            }
        }&lt;/PRE&gt;</description>
    <pubDate>Sun, 07 Oct 2018 17:20:45 GMT</pubDate>
    <dc:creator>moogalm</dc:creator>
    <dc:date>2018-10-07T17:20:45Z</dc:date>
    <item>
      <title>Unzip zip resources file</title>
      <link>https://forums.autodesk.com/t5/net-forum/unzip-zip-resources-file/m-p/8216943#M24951</link>
      <description>&lt;P&gt;hello all&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have an resources file called file.zip&lt;/P&gt;&lt;P&gt;to unzip it i must copy it to hard disk&amp;nbsp; and i have no problem to copy outside it and unzip it directly using ZipFile class&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but my question how can i zip it without copy it , i mean using memory stream&amp;nbsp;&lt;/P&gt;&lt;P&gt;i begin from this line but i can't to complete my code to send the stream to ZipFile&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            string resource = "Installer.Resources.myFile.zip";
            System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
            Stream resFilestream = a.GetManifestResourceStream(resource);
            &lt;FONT color="#800000"&gt;//ZipArchive archive = ZipFile.OpenRead(resFilestream);&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;OpenRead must give it an string path to can read the archive , but i need to use the stream variable to can unzip some contains not all in this archive.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i hope my question is clear &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 14:51:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unzip-zip-resources-file/m-p/8216943#M24951</guid>
      <dc:creator>Amremad</dc:creator>
      <dc:date>2018-08-22T14:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Unzip zip resources file</title>
      <link>https://forums.autodesk.com/t5/net-forum/unzip-zip-resources-file/m-p/8318304#M24952</link>
      <description>&lt;P&gt;If I understand correctly, you are looking for reading entries in-memory of an archive.&lt;/P&gt;
&lt;P&gt;For example, I have .zip file which wraps a *.txt file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; static void Main(string[] args)
        {
            using (FileStream zipToOpen = new FileStream(@"D:\dotnetsnips\inmemroryArchive\reader.zip", FileMode.Open))
            {
                using (ZipArchive archive = new ZipArchive(zipToOpen, ZipArchiveMode.Read))
                {
                    foreach (ZipArchiveEntry entry in archive.Entries)
                    {
                        if (entry.FullName.EndsWith(".txt", StringComparison.OrdinalIgnoreCase))
                        {
                            using (StreamReader reader = new StreamReader(entry.Open()))
                            {
                                Console.WriteLine(reader.ReadLine());
                            }
                        }

                    }
                }
            }
        }&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Oct 2018 17:20:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unzip-zip-resources-file/m-p/8318304#M24952</guid>
      <dc:creator>moogalm</dc:creator>
      <dc:date>2018-10-07T17:20:45Z</dc:date>
    </item>
  </channel>
</rss>

