예제 #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);
         });
     });
 }