cmdGzip function

Future<List<int>> cmdGzip(
  1. List<int> data
)

Implementation

Future<List<int>> cmdGzip(List<int> data) async {
  final p = await Process.start('gzip', ['-c']);
  p.stdin.add(data);
  await p.stdin.close();
  return await p.stdout.fold([], (a ,b)=>a);
}