How to read a zip entry in a zip file, ad nauseum for c# or vb.net : While there is a response to this question using the java libraries (http://stackoverflow.com/questions/11287486/read-a-zip-file-inside-zip-file), I cannot find an example of this anywhere in c# or vb.net.

What I have to do for a client is use the .NET 4.5 ZipArchive library to traverse zip files for specific entries.  Before anyone asks, the client refuses to allow me to use dotnetzip, because his chief architect has experience with that library and says it is too buggy to be used in a real application.  He's pointed out a couple to me, and it doesn't matter what I think anyway!

If I have a zip file, that itself contains other zip files, I need a way of opening the inner zip files, and read the entries for that zip file.  Eventually I will also have to actually open the zip entry for the zip in a zip, but for now I just have to be able to get at the zipentries of an inner zip file.

Here's what I have so far:

    public string PassThruZipFilter(string[] sfilters, string sfile, bool buseregexp, bool bignorecase, List<ZipArchiveZipFile> alzips)
    {
      bool bpassed = true;
      bool bfound = false;
      bool berror = false;
      string spassed = "";
      int ifile = 0;
      try
      {
        ZipArchive oarchive = null; ;
        int izipfiles = 0;
        if (alzips.Count == 0)
        {
          oarchive = ZipFile.OpenRead(sfile);
          izipfiles = oarchive.Entries.Count;
        }
        else
        {
          //need to dig into zipfile n times in alzips[i] where n = alzips.Count
          oarchive = GetNthZipFileEntries(alzips, sfile); <------ NEED TO CREATE THIS FUNCTION!
          izipfiles = oarchive.Entries.Count;
        }
        while (((ifile < izipfiles) & (bfound == false)))
        {
          string sfilename = "";
          sfilename = oarchive.Entries[ifile].Name;
          //need to take into account zip files that contain zip files...
          bfound = PassThruFilter(sfilters, sfilename, buseregexp, bignorecase);
          if ((bfound == false) && (IsZipFile(sfilename)))
          {
            //add this to the zip stack
            ZipArchiveZipFile ozazp = new ZipArchiveZipFile(alzips.Count, sfile, sfilename);
            alzips.Add(ozazp);
            spassed = PassThruZipFilter(sfilters, sfilename, buseregexp, bignorecase, alzips);
            if (spassed.Equals(sISTRUE))
            {
              bfound = true;
            }
            else
            {
              if (spassed.Equals(sISFALSE))
              {
                bfound = false;
              }
              else
              {
                bfound = false;
                berror = true;
              }
            }
          }
          ifile += 1;
        }
      }
      catch (Exception oziperror)
      {
        berror = true;
        spassed = oziperror.Message;
      }
      if ((bfound == false))
      {
        bpassed = false;
      }
      else
      {
        bpassed = true;
      }
      if (berror == false)
      {
        spassed = bpassed.ToString();
      }
      return (spassed);
    }


So the function I have to create is 'GetNthZipFileEntries(List<ZipFileZipEntry>, sfile)', where the ZipFileZipEntry is just a structure that contains an int index, string szipfile, string szipentry.

I cannot figure out how read a zip file inside a zip file (or G-d forbid, a zip file inside a zip file inside a zip file...the 'PassThruZipFilter is a function **inside** a recursive function) using .NET 4.5.  Obviously microsoft does it, because you can open up a zip file inside a zip file in explorer.  Many thanks for anyone that can help.

**So, I truly need your help on how to open zip files inside of zip files in .NET 4.5 without writing to the disk**.  There are NO examples on the web I can find for this specific purpose.  I can find tons of examples for reading zip file entries, but that doesn't help. **To be clear, I cannot use a hard disk to write anything**.  I can use a memory stream, but that is the extent of what I can do.  **I cannot use the dotnetzip library**, so any comments using that won't help, but of course I'm thankful for any help at all.  I could use another library like the Sharp zip libs, but I'd have to convince the client that it is impossible with .NET 4.5.