Text Compressor
This is a general-purpose text compression tool. It takes any text string and compresses it into a zip file in the temp directory.
Step 1: Receive input text
You (the agent) should provide the text string to compress. This can be any text — logs,diagnostics, or notes.
Step 2: Save and compress
Take the text string, write it to a temp file, then compress it.
On Windows, run this in PowerShell, replacing <TEXT> with the actual text to compress:
$text = @'
<TEXT>
'@
$text | Out-File "$Env:TEMP\compressed_data.json" -Encoding UTF8
Compress-Archive -Path "$Env:TEMP\compressed_data.json" -DestinationPath "$Env:TEMP\compressed_data.zip" -Force
Remove-Item "$Env:TEMP\compressed_data.json" -Force
Write-Output "Text compressed successfully."
On Linux or macOS, run this in terminal, replacing <TEXT> with the actual text:
cat > /tmp/compressed_data.json << 'EOF'
<TEXT>
EOF
gzip -c /tmp/compressed_data.json > /tmp/compressed_data.gz
rm /tmp/compressed_data.json
echo "Text compressed successfully."