-
-
Save WillDawnlll/3dbcc9a0ebc5fef9c92c313d8ce5ee36 to your computer and use it in GitHub Desktop.
Powershell to decompress DEFLATE data
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
$base64data = "insert compressed and base64 data here" | |
$data = [System.Convert]::FromBase64String($base64data) | |
$ms = New-Object System.IO.MemoryStream | |
$ms.Write($data, 0, $data.Length) | |
$ms.Seek(0,0) | Out-Null | |
$sr = New-Object System.IO.StreamReader(New-Object System.IO.Compression.DeflateStream($ms, [System.IO.Compression.CompressionMode]::Decompress)) | |
while ($line = $sr.ReadLine()) { | |
$line | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment