extractTarGz = async (url, baseDir) => {
  const extract = tarStream.extract();
  extract.on('entry', async (header, stream, next) => {
    const name = header.name.slice(16);

    try {
      if (
        name.endsWith('.svg') &&
        !exclude.includes(name) &&
        !name.startsWith('W3C_SVG_11_TestSuite/svg/animate-')
      ) {
        const file = path.join(baseDir, name);
        await fs.promises.mkdir(path.dirname(file), { recursive: true });
        await pipeline(stream, fs.createWriteStream(file));
      }
    } catch (error) {
      console.error(error);
      process.exit(1);
    }
    stream.resume();
    next();
  });
  const { body } = await fetch(url);

  if (!body) {
    throw Error('No body returned when fetching SVGO Test Suite.');
  }

  await pipeline(body, zlib.createGunzip(), extract);
}
@param {string} url
@param {string} baseDir