private static void Warmup(TimedMethod compressor, TimedMethod decompressor) { const int length = 1 * 1024 * 1024; var data = new byte[length]; var gen = new Random(0); gen.NextBytes(data); var compressed = compressor.Warmup(data, length); AssertEqual(data, decompressor.Warmup(compressed, length), compressor.Name); }
private static void Warmup(TimedMethod compressor, TimedMethod decompressor) { Console.WriteLine("Warming up..."); const int length = 1 * 1024 * 1024; var data = new byte[length]; var gen = new Random(0); gen.NextBytes(data); var compressed = compressor.Warmup(data, length); decompressor.Warmup(compressed, length); }