Example #1
0
 public bool Start(string sourceFile, string destinationFile, GZipModes gZipMode)
 {
     try
     {
         var gZiper = _gZipFactory.GetGZiper(this, gZipMode);
         return(gZiper.Execute(sourceFile, destinationFile));
     }
     catch (Exception ex)
     {
         IsCancelled = true;
         return(false);
     }
 }
Example #2
0
        public GZip GetGZiper(GZipController gZipController, GZipModes gZipMode)
        {
            switch (gZipMode)
            {
            case GZipModes.Compress:
                return(new GZipCompressor(gZipController));

            case GZipModes.Decompress:
                return(new GZipDecompressor(gZipController));

            default:
                return(null);
            }
        }