How to Get the number of files included in a byte array?
<p>I am using <code>ICSharpCode.SharpZipLib.Core</code> library to zip the files in my C# code. After zipping i will return a byte array . Is there any way we can find the number of files in the byte array ? </p>

<p>my code looks like</p>

<pre><code>string FilePath ="C:\HELLO";
 MemoryStream outputMemStream = new MemoryStream();
            ZipOutputStream zipStream = new ZipOutputStream(outputMemStream);
            foreach (var file in files)
            {
                FileInfo fi = new FileInfo(string.Concat(FilePath, file));
                if (fi.Exists)
                {
                    var entryName = ZipEntry.CleanName(fi.Name);
                    ZipEntry newEntry = new ZipEntry(entryName);
                    newEntry.DateTime = DateTime.Now;
                    newEntry.Size = fi.Length;
                    zipStream.PutNextEntry(newEntry);

                    byte[] buffer = new byte[4096];
                    var fs = File.OpenRead(string.Concat(FilePath, file));
                    var count = fs.Read(buffer, 0, buffer.Length);
                    while (count &gt; 0)
                    {
                        zipStream.Write(buffer, 0, count);
                        count = fs.Read(buffer, 0, buffer.Length);  
                    }
                }
            }
            zipStream.Close();
            byte[] byteArrayOut = outputMemStream.ToArray();
            return byteArrayOut;
</code></pre>
