Multiple file in one Stream, custom stream
<p>According to the answer <a href="https://stackoverflow.com/questions/40103387/best-way-to-return-large-file-as-split-zip-files-stream-or-byte-array-wcf">here</a> I want to write multiple files stream to one stream as following:</p>

<p>4 byte reserved for length number of each stream
each stream content write after it's length number(after 4 byte)
at the end stream will be something like this</p>

<p><strong>Stream = <code>File1 len + File1 stream content + File2 len + File2 stream content + ....</code></strong></p>

<p>Example code:</p>

<pre><code>result = new ExportResult_C()
            {
                PackedStudy = packed.ToArray() ,
                Stream = new MemoryStream()
            };
            string[] zipFiles = Directory.GetFiles(zipRoot);
            foreach (string fileN in zipFiles)
            {
                MemoryStream outFile = new MemoryStream(File.ReadAllBytes(fileN));
                MemoryStream len = new MemoryStream(4);
                //initiate outFile len to 4 byte push it to main stream
                //Then push outFile stream to main stream
                //Continue and do this for another file 
            } 
            //For test Save stream to file(s)
</code></pre>

<p>is it good idea? really don't know how that comments can be lines of code.</p>

<p>Thanks in advance.</p>