title: Sharpziplib uncompress embedded resource
body: <p>I have a zip file as an embedded resource. Using the following code:</p>
  
  <pre><code>Stream zipStream;
  zipStream = thisAssembly.GetManifestResourceStream("Namespace.Resources.zipfile.zip");
  byte[] data = Decompress(zipStream);
  
      public static byte[] Decompress(Stream zipStream)
              {
                  ZipInputStream zipInputStream = new ZipInputStream(zipStream);
                  //zipInputStream.CanDecompressEntry is false
                  ZipEntry zipEntry;
                  MemoryStream zipoutStream = new MemoryStream();
  
                  while((zipEntry = zipInputStream.GetNextEntry()) != null)
                  {
                      byte[] buffer = new byte[zipInputStream.Length];
                      zipInputStream.Read(buffer, 0, (int)zipInputStream.Length);
                      zipoutStream.Read(buffer, 0, buffer.Length);
                  }
                  return zipoutStream.ToArray();
              }
  </code></pre>
  
  <p>The decompress method always returns null. CanDecompressEntry is always false. Any other way to unzip embedded resources?</p>