Last active
May 16, 2019 11:21
-
-
Save unitycoder/edfc22570e93db61f83d582c98c4dff5 to your computer and use it in GitHub Desktop.
Revisions
-
unitycoder revised this gist
May 11, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ // unity sharpcompress example : https://unitycoder.com/blog/2019/05/12/using-sharpcompress-in-unity/ // https://github.com/adamhathcock/sharpcompress using SharpCompress.Archives; -
unitycoder created this gist
May 11, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ // unity sharpcompress example : // https://github.com/adamhathcock/sharpcompress using SharpCompress.Archives; using SharpCompress.Archives.Zip; using System.IO; using UnityEngine; public class SharpCompressTest : MonoBehaviour { void Start() { // ZipArchive with Writing API Example: (creates zip file from source folder files) using (var archive = ZipArchive.Create()) { string sourceFolder = "d:/data/testzip"; archive.AddAllFromDirectory(sourceFolder); string outputPath = "d:/data/test.zip"; using (FileStream fs = File.Create(outputPath)) { archive.SaveTo(fs); } } } }