void StartUnzip() { mState = EState.Extracting; if (extractFromFile) { mZip2.ExtractZip(mZipFile, mTargetDir, ICSharpCode.SharpZipLib.Zip.FastZip2.Overwrite.Always, null, null, null, false); } else { mZip2.ExtractZip(mZipStream, mTargetDir, ICSharpCode.SharpZipLib.Zip.FastZip2.Overwrite.Always, null, null, null, false, true); } }
public static void Unzip(Stream zipStream, string targetDir, ICSharpCode.SharpZipLib.Core.TotalProgressHandler hTotalProgress = null, ICSharpCode.SharpZipLib.Core.ProcessDirectoryHandler hProcessDirectory = null, ICSharpCode.SharpZipLib.Core.ProcessFileHandler hProcessFile = null, ICSharpCode.SharpZipLib.Core.ProgressHandler hProgress = null, ICSharpCode.SharpZipLib.Core.CompletedFileHandler hCompletedFile = null, ICSharpCode.SharpZipLib.Core.DirectoryFailureHandler hDirectoryFailure = null, ICSharpCode.SharpZipLib.Core.FileFailureHandler hFileFailure = null) { ICSharpCode.SharpZipLib.Zip.FastZipEvents2 events = new ICSharpCode.SharpZipLib.Zip.FastZipEvents2(); events.TotalProgress = hTotalProgress; events.ProcessDirectory = hProcessDirectory; events.ProcessFile = hProcessFile; events.Progress = hProgress; events.CompletedFile = hCompletedFile; events.DirectoryFailure = hDirectoryFailure; events.FileFailure = hFileFailure; events.ProgressInterval = TimeSpan.FromSeconds(0.5); mZip2 = new ICSharpCode.SharpZipLib.Zip.FastZip2(events); mZip2.ExtractZip(zipStream, targetDir, ICSharpCode.SharpZipLib.Zip.FastZip2.Overwrite.Always, null, null, null, true, true); }
public static void StartUnzipFile() { mZip2.ExtractZip(mZipFile, mTargetDir, ICSharpCode.SharpZipLib.Zip.FastZip2.Overwrite.Always, null, null, null, true); }