public ReaderForCompress(string inputFile, IChunkQueue readBuffer, int bufferSize, Canceler canceler) { this.inputFile = inputFile; this.readBuffer = readBuffer; this.bufferSize = bufferSize; this.Canceler = canceler; }
public Decompressor(IChunkQueue readBuffer, IChunkQueue writeBuffer, int bufferSize, Canceler canceler) { this.readBuffer = readBuffer; this.writeBuffer = writeBuffer; this.bufferSize = bufferSize; this.Canceler = canceler; }
static void Main(string[] args) { var time = Stopwatch.StartNew(); canceler = new Canceler(); Console.CancelKeyPress += new ConsoleCancelEventHandler(cancelHandler); try { ValidateCommandLineInput(args); var mode = args[0]; var inputFile = args[1]; var outputFile = args[2]; gzipper = new Gzipper(inputFile, outputFile, canceler); if (mode == "compress") { gzipper.Compress(); } else { gzipper.Decompress(); } Console.WriteLine($"time Elapsed - {time.Elapsed.TotalSeconds}"); } catch (Exception e) { Console.WriteLine(e.Message); canceler.Cancel(); } }
public Gzipper(string input, string output, Canceler cancr) { inputFile = input; outputFile = output; canceler = cancr; }
public WriterForCompress(string outputFile, IChunkQueue writeBuffer, Canceler canceler) { this.outputFile = outputFile; this.writeBuffer = writeBuffer; this.Canceler = canceler; }
public Compressor(IChunkQueue readBuffer, IChunkQueue writeBuffer, Canceler canceler) { this.readBuffer = readBuffer; this.writeBuffer = writeBuffer; this.Canceler = canceler; }