benchGzip function
Implementation
Future benchGzip(List<int> input) async {
Stopwatch sw1 = new Stopwatch()..start();
List<int> encoded;
for (int i = 0; i < 100; i++) {
encoded = await cmdGzip(input);
}
sw1.stop();
Stopwatch sw2 = new Stopwatch()..start();
for (int i = 0; i < 100; i++) {
gz1.decode(encoded);
}
sw2.stop;
print(['cmd',
(encoded.length * 100 / input.length).toStringAsFixed(2),
sw1.elapsedMilliseconds,
sw2.elapsedMilliseconds,
]);
}