Create Zip archive from multiple in memory files in C#

后端 未结 8 1910
情话喂你
情话喂你 2020-12-13 02:06

Is there a way to create a Zip archive that contains multiple files, when the files are currently in memory? The files I want to save are really just text only and are stor

8条回答
  •  猫巷女王i
    2020-12-13 02:54

    Use a StringReader to read from your string objects and expose them as Stream s.

    That should make it easy to feed them to your zip-building code.

提交回复
热议问题