當前位置:首頁 » 文件管理 » 壓縮成gz

壓縮成gz

發布時間: 2023-08-18 14:15:12

Ⅰ 把文件壓縮成gz文件用什麼工具壓縮

需要使用winrar或者7_zip壓縮工具,如果你已經安裝了應該會自動關聯到滑鼠右鍵的。以winrar為例:
選中你要壓縮的文件,右鍵選擇添加到檔案文件(如果是7zip則是添加到壓縮文件),然後命名壓縮文件,注意後綴為.gz,格式選擇正常,開始壓縮就可以了,如果是7zip的話也差不多,希望能幫到你。

linux把文件壓縮成.tar.gz的命令

1、連接上相應的linux主機,進入到等待輸入shell指令的linux命令行狀態下。

Ⅲ 怎麼在Linux下壓縮文件夾成為.gz文件不是.tar.gz

兩種方法:
tar命令: tar czvf a.tar.gz /etc/ ##把etc下的文件打包成a.tar.gz
gzip命令: gzip b.tar.gz /etc/ ##同上,只是命令不同
另外,可以通過gunzip解壓a/b.tar.gz成a/b.tar,tar只是打包,不壓縮;gz是gzip的壓縮方式,特點是速度快,壓縮率不高。

java如何壓縮成gz包

import java.io.*;
import java.util.zip.*;

public class GZIPcompress {
public static void main(String[] args) {
try {
BufferedReader in =
new BufferedReader(
new FileReader(args[0]));
BufferedOutputStream out =
new BufferedOutputStream(
new GZIPOutputStream(
new FileOutputStream("test.gz")));
System.out.println("Writing file");
int c;
while((c = in.read()) != -1)
out.write(c);
in.close();
out.close();
System.out.println("Reading file");
BufferedReader in2 =
new BufferedReader(
new InputStreamReader(
new GZIPInputStream(
new FileInputStream("test.gz"))));
String s;
while((s = in2.readLine()) != null)
System.out.println(s);
} catch(Exception e) {
e.printStackTrace();
}
}
} ///:~

Ⅳ 把文件壓縮成gz文件用什麼工具壓縮

需要使用winrar或者7_zip壓縮工具,如果你已經安裝了應該會自動關聯到滑鼠右鍵的。以winrar為例:
選中你要壓縮的文件,右鍵選擇添加到檔案文件(如果是7zip則是添加到壓縮文件),然後命名壓縮文件,注意後綴為.gz,格式選擇正常,開始壓縮就可以了,如果是7zip的話也差不多,希望能幫到你。

熱點內容
java返回this 發布:2025-10-20 08:28:16 瀏覽:605
製作腳本網站 發布:2025-10-20 08:17:34 瀏覽:896
python中的init方法 發布:2025-10-20 08:17:33 瀏覽:590
圖案密碼什麼意思 發布:2025-10-20 08:16:56 瀏覽:775
怎麼清理微信視頻緩存 發布:2025-10-20 08:12:37 瀏覽:694
c語言編譯器怎麼看執行過程 發布:2025-10-20 08:00:32 瀏覽:1021
郵箱如何填寫發信伺服器 發布:2025-10-20 07:45:27 瀏覽:265
shell腳本入門案例 發布:2025-10-20 07:44:45 瀏覽:124
怎麼上傳照片瀏覽上傳 發布:2025-10-20 07:44:03 瀏覽:814
python股票數據獲取 發布:2025-10-20 07:39:44 瀏覽:723