Skip to content

Instantly share code, notes, and snippets.

@Luiz-Monad
Forked from vortexau/decompress.ps1
Created December 12, 2021 18:10
Show Gist options
  • Save Luiz-Monad/1e4ff2df03c42f8a3b829ad0bc01c688 to your computer and use it in GitHub Desktop.
Save Luiz-Monad/1e4ff2df03c42f8a3b829ad0bc01c688 to your computer and use it in GitHub Desktop.
Powershell to decompress DEFLATE data
function extract($i, $o) {
$i = [System.IO.File]::OpenRead($i)
$o = [System.IO.File]::OpenWrite($o)
$t = New-Object System.IO.Compression.DeflateStream($i, [System.IO.Compression.CompressionMode]::Decompress)
$t.CopyTo($o)
$t.Close()
$o.Close()
$i.Close()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment