Пример #1
0
 public void MultipleThreadsStreamCompressViaLinq()
 {
     UseDefaultConfiguration(defaultConfiguration =>
     {
         UseDifferentBufferSizes(defaultConfiguration, bufferSize =>
         {
             UseMeasure(stopMeasure =>
             {
                 CompressionStream.MultipleThreadsCompressByParts(
                     defaultConfiguration.CompressingFile.FullName,
                     defaultConfiguration.CompressedFile.FullName,
                     bufferSize);
                 stopMeasure();
             }, defaultConfiguration.CompressingFile);
         });
     });
 }
Пример #2
0
 public void SingleThreadStreamCompress()
 {
     UseDefaultConfiguration(defaultConfiguration =>
     {
         UseDifferentBufferSizes(defaultConfiguration, bufferSize =>
         {
             UseMeasure(stopMeasure =>
             {
                 CompressionStream.Compress(
                     defaultConfiguration.CompressingFile.FullName,
                     defaultConfiguration.CompressedFile.FullName,
                     bufferSize);
                 stopMeasure();
             }, defaultConfiguration.CompressingFile);
         });
     });
 }