是否可以使用stdin/stdout在bash中壓縮/解壓縮字符串?(Un/De)在bash中壓縮字符串?
我嘗試這樣做,但顯然它不支持?
hey=$(echo "hello world" | gzip -cf)
echo $hey # returns a compressed string
echo $hey | gzip -cfd
gzip: stdin is a multi-part gzip file -- not supported
我不熟悉linux,但我讀了其他壓縮實用程序手冊頁並找不到解決方案?
壓縮將是'的base64 -w0'時base64'的'的正確使用。否則,換行符將被添加到輸出中。 – JohnEye