コード例 #1
0
 public ReaderForCompress(string inputFile, IChunkQueue readBuffer, int bufferSize, Canceler canceler)
 {
     this.inputFile  = inputFile;
     this.readBuffer = readBuffer;
     this.bufferSize = bufferSize;
     this.Canceler   = canceler;
 }
コード例 #2
0
 public Decompressor(IChunkQueue readBuffer, IChunkQueue writeBuffer, int bufferSize, Canceler canceler)
 {
     this.readBuffer  = readBuffer;
     this.writeBuffer = writeBuffer;
     this.bufferSize  = bufferSize;
     this.Canceler    = canceler;
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: hipopasran/Test_Veeam
        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();
            }
        }
コード例 #4
0
 public Gzipper(string input, string output, Canceler cancr)
 {
     inputFile  = input;
     outputFile = output;
     canceler   = cancr;
 }
コード例 #5
0
 public WriterForCompress(string outputFile, IChunkQueue writeBuffer, Canceler canceler)
 {
     this.outputFile  = outputFile;
     this.writeBuffer = writeBuffer;
     this.Canceler    = canceler;
 }
コード例 #6
0
 public Compressor(IChunkQueue readBuffer, IChunkQueue writeBuffer, Canceler canceler)
 {
     this.readBuffer  = readBuffer;
     this.writeBuffer = writeBuffer;
     this.Canceler    = canceler;
 }