Zip usage from script task

Jan 10, 2015 at 10:38 PM
Although it was designed to be used in the control flow, is there an clean way of using it from within a script task? I have used the code below successfully, but it seems as more of a hack.

ZipManager zm = new ZipManager(@"C:\Temp\test.zip", @"C:\Temp", SSIS.Extensions.ZipCompressionLevel.Normal, null, false, null, true, true, SSIS.Extensions.LogLevel.None, null);
zm.removeSource = true;
zm.UnZip();