Created
August 16, 2024 13:01
-
-
Save chrisfesler/1298b239ffb2b3b64d036dd4895a5b2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set variables | |
$zipUrl = "https://digitalcorpora.s3.amazonaws.com/corpora/files/govdocs1/zipfiles/000.zip" | |
$zipFile = ".\000.zip" | |
$unzipPath = ".\unzipped" | |
# Measure download time | |
$downloadTime = Measure-Command { | |
Invoke-WebRequest -Uri $zipUrl -OutFile $zipFile | |
} | |
Write-Host "Download Time: $($downloadTime.TotalSeconds) seconds" | |
# Create the directory for unzipping | |
New-Item -ItemType Directory -Path $unzipPath -Force | Out-Null | |
# Measure unzip time using 7-Zip | |
$unzipTime = Measure-Command { | |
& "7z.exe" x $zipFile -o$unzipPath -y | |
} | |
Write-Host "Unzip Time: $($unzipTime.TotalSeconds) seconds" | |
# Clean up | |
Remove-Item $zipFile -Force | |
Remove-Item $unzipPath -Recurse -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment