This file contains 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 characters
IArchive archive = new Archive("archive.zip"); | |
archive.ExtractToDirectory("D:\\") |
This file contains 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 characters
string directoryPath = @"C:\path\to\your\directory"; | |
ArchiveInfo.ArchiveFormat format = ArchiveInfo.ArchiveFormat.Zip; | |
ArchiveFactory.CompressDirectory(directoryPath, format); |
This file contains 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 characters
using (var archive = new Archive()) | |
{ | |
archive.CreateEntries(@"D:\BigFolder"); | |
EventsBag eb = new EventsBag(); | |
eb.EntryCompressed += delegate(object sender, CancelEntryEventArgs args) | |
{ | |
if (args.Entry.Name == @"BigFolder\last.bin")) | |
args.Cancel = true; | |
}; | |
archive.Save("output.zip", new ArchiveSaveOptions() { EventsBag = eb }); |