一連のバイト配列から .NET 4.5 (System.IO.Compression) で Zip ファイルを作成しようとしています。例として、私が使用している API から、最終的に が得られ、List<Attachment>
それぞれAttachment
に と呼ばれるプロパティBody
がありbyte[]
ます。そのリストを反復処理して、各添付ファイルを含む zip ファイルを作成するにはどうすればよいですか?
現在、各添付ファイルをディスクに書き込み、そこから zip ファイルを作成する必要があるという印象を受けています。
//This is great if I had the files on disk
ZipFile.CreateFromDirectory(startPath, zipPath);
//How can I create it from a series of byte arrays?