I have a number of files belonging to some logical category, say, "Category_A", and a number of other files belonging to a different logical category ("Category_B"). I would like to create an in-memory ZIP object (MemoryStream, or byte array, or something else) so that the resulting structure of the ZIP object reflects the following scheme:
ZIP
+-Category_A
| +FileA1
| +FileA2
| ...
+-Category_B
+FileB1
+FileB2
...
Directories "Category_A" and "Category_B" do not exist in the source file system, and the files come from different places.
Is there some possibility to achieve this with any library? (My project is in .Net 4.0, upgrading is no option). I tried with the IonicZip Zip File and GZipStream, but did not find a solution.