public static async ValueTask ExtractToFileAsync(this ZipArchiveEntry entry, DirectoryInfo dir) { await dir.CreateStrongAsync(); entry.ThrowIfNull(nameof(entry)); using var stream = entry.Open(); var fileName = Path.Combine(dir.FullName, entry.Name); using var file = File.Create(fileName); await stream.CopyToAsync(file); await file.FlushAsync(); }