public void Process(string inputFilePath, string outputFilePath, OperationType operation) { switch (operation) { case OperationType.Compress: _executor.AddTasks( PrepareTasksForCompression(inputFilePath, outputFilePath, _bufferSize)); break; case OperationType.Decompress: _executor.AddTasks( PrepareTasksForDecompression(inputFilePath, outputFilePath, _bufferSize)); break; default: throw new ArgumentException("Unknown archiver operation type."); } _executor.Start(); }