Anul 3 Semestrul 2

This commit is contained in:
2025-07-03 20:56:38 +03:00
parent 184f3bd92e
commit 3b7fb85767
269 changed files with 20955 additions and 0 deletions
@@ -0,0 +1,25 @@
using System;
using FileCompression.Interfaces;
using FileCompression.Services.Strategies;
namespace FileCompression.Services.Composites;
public class FileCompressor : ICompressor
{
private string sourcePath;
private string destinationPath;
private string basePath;
private StrategyContext strategyContext;
public FileCompressor(string sourcePath, string destinationPath, string basePath, StrategyContext strategyContext)
{
this.sourcePath = sourcePath;
this.destinationPath = destinationPath;
this.strategyContext = strategyContext;
this.basePath = basePath;
}
public void Compress()
{
strategyContext.CompressFile(sourcePath, destinationPath, basePath);
}
}