Archived Forum Post

Index of archived forum posts

Question:

ZIP: add files and start compression while adding more files

Sep 17 '15 at 03:34

Hi there,

currently we are creating zip files in c# using multiple calls of:

zip.AppendFromDir = "somedir1"; zip.PathPrefix = @"pathinzip"; success=zip.AppendFiles(".", true);

zip.AppendFromDir = "somedir2"; zip.PathPrefix = @"pathinzip2"; success=zip.AppendFiles(".", true);

....

success = zip.WriteZipAndClose();

Between the single zip.AppendFiles are several minutes we have to wait for a other task to finish creating the files. So it would be great, if we already can start the zip process in background and add the next path when it is ready. It are quite large files that are compressed, so starting the zip while creating the next file would save a lot of time. Is there a way to do this?

Kind regards Andreas


Answer

Perhaps use the xxxxxAsync methods introduced a short while ago: http://www.chilkatsoft.com/refdoc/vcCkZipDoc.html#method505