public void Decompression()
 {
     Benchmark.Run("Decompressing", 1024 * 1024 * 2, benchmark =>
     {
         var stream = new RepeaterStream(GetCompressedFile(benchmark.Input));
         var decompressor = new SnappyDOTNETStream(stream, CompressionMode.Decompress);
         var decompressed = new byte[benchmark.Input.Length];
         benchmark.Stopwatch.Start();
         for (int i = 0; i < benchmark.Iterations; ++i)
             ReadFully(decompressor, decompressed, 0, decompressed.Length);
         benchmark.Stopwatch.Stop();
     });
 }
Exemple #2
0
 public void Decompression()
 {
     Benchmark.Run("Decompressing", 1024 * 1024 * 2, benchmark =>
     {
         var stream       = new RepeaterStream(GetCompressedFile(benchmark.Input));
         var decompressor = new SnappyDOTNETStream(stream, CompressionMode.Decompress);
         var decompressed = new byte[benchmark.Input.Length];
         benchmark.Stopwatch.Start();
         for (int i = 0; i < benchmark.Iterations; ++i)
         {
             ReadFully(decompressor, decompressed, 0, decompressed.Length);
         }
         benchmark.Stopwatch.Stop();
     });
 }