{"id":1188,"date":"2019-04-27T11:38:11","date_gmt":"2019-04-27T03:38:11","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=1188"},"modified":"2022-05-04T18:14:19","modified_gmt":"2022-05-04T10:14:19","slug":"gzip","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/gzip","title":{"rendered":"gzip\u547d\u4ee4 – \u538b\u7f29\u548c\u89e3\u538b\u6587\u4ef6"},"content":{"rendered":"\n

gzip\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u5355\u8bcdgunzip\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u538b\u7f29\u548c\u89e3\u538b\u6587\u4ef6\u3002gzip\u662f\u4e00\u6b3e\u4f7f\u7528\u5e7f\u6cdb\u7684\u538b\u7f29\u5de5\u5177\uff0c\u6587\u4ef6\u7ecf\u8fc7\u538b\u7f29\u540e\u4e00\u822c\u4f1a\u4ee5.gz\u540e\u7f00\u7ed3\u5c3e\uff0c\u4e0etar\u547d\u4ee4\u5408\u7528\u540e\u5373\u4e3a.tar.gz\u540e\u7f00\u3002<\/p>\n\n\n\n

\u636e\u7edf\u8ba1\uff0cgzip\u547d\u4ee4\u5bf9\u6587\u672c\u6587\u4ef6\u7684\u538b\u7f29\u6bd4\u7387\u901a\u5e38\u80fd\u8fbe\u523060%~70%\uff0c\u538b\u7f29\u540e\u53ef\u4ee5\u5f88\u597d\u7684\u63d0\u5347\u5b58\u50a8\u7a7a\u95f4\u7684\u4f7f\u7528\u7387\uff0c\u8fd8\u80fd\u591f\u5728\u7f51\u7edc\u4f20\u8f93\u6587\u4ef6\u65f6\u51cf\u5c11\u7b49\u5f85\u65f6\u95f4\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>gzip [\u53c2\u6570] \u6587\u4ef6<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-a<\/td>\u4f7f\u7528ASCII\u6587\u5b57\u6a21\u5f0f<\/td><\/tr>
-d<\/td>\u89e3\u5f00\u538b\u7f29\u6587\u4ef6<\/td><\/tr>
-f<\/td>\u5f3a\u884c\u538b\u7f29\u6587\u4ef6<\/td><\/tr>
-k<\/td>\u4fdd\u7559\u539f\u6587\u4ef6<\/td><\/tr>
-l<\/td>\u5217\u51fa\u538b\u7f29\u6587\u4ef6\u7684\u76f8\u5173\u4fe1\u606f<\/td><\/tr>
-c<\/td>\u628a\u538b\u7f29\u540e\u7684\u6587\u4ef6\u8f93\u51fa\u5230\u6807\u51c6\u8f93\u51fa\u8bbe\u5907\uff0c\u4e0d\u53bb\u66f4\u52a8\u539f\u59cb\u6587\u4ef6<\/td><\/tr>
-r<\/td>\u9012\u5f52\u5904\u7406\uff0c\u5c06\u6307\u5b9a\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u53ca\u5b50\u76ee\u5f55\u4e00\u5e76\u5904\u7406<\/td><\/tr>
-q<\/td>\u4e0d\u663e\u793a\u8b66\u544a\u4fe1\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u5c06\u6307\u5b9a\u7684\u6587\u4ef6\u8fdb\u884c\u538b\u7f29\uff0c\u538b\u7f29\u5305\u9ed8\u8ba4\u4f1a\u4ee5\u201c\u539f\u6587\u4ef6\u540d.gz\u201d\u4fdd\u5b58\u5230\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e0b\uff0c\u539f\u6587\u4ef6\u4f1a\u88ab\u81ea\u52a8\u5220\u9664\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# gzip anaconda-ks.cfg<\/strong><\/pre>\n\n\n\n

\u89e3\u538b\u6307\u5b9a\u7684\u538b\u7f29\u5305\u6587\u4ef6\uff0c\u5e76\u663e\u793a\u89e3\u538b\u8fc7\u7a0b\u3002\u89e3\u538b\u540e\u7684\u6587\u4ef6\u4f1a\u4fdd\u5b58\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e0b\uff0c\u538b\u7f29\u5305\u4f1a\u88ab\u81ea\u52a8\u5220\u9664\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# gzip -dv anaconda-ks.cfg.gz <\/strong>\r\nanaconda-ks.cfg.gz:\t 44.3% -- replaced with anaconda-ks.cfg\r<\/pre>\n\n\n\n

\u5c06\u6307\u5b9a\u7684\u6587\u4ef6\u8fdb\u884c\u538b\u7f29\uff0c\u4f46\u662f\u4e0d\u5220\u9664\u539f\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# gzip -k initial-setup-ks.cfg<\/strong><\/pre>\n\n\n\n

\u663e\u793a\u6307\u5b9a\u6587\u4ef6\u7684\u538b\u7f29\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# gzip -l initial-setup-ks.cfg.gz <\/strong>\n         compressed        uncompressed  ratio uncompressed_name\n                929                1585  43.8% initial-setup-ks.cfg\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

gzip\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u5355\u8bcdgunzip\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u538b\u7f29\u548c\u89e3\u538b\u6587\u4ef6\u3002gzip\u662f\u4e00\u6b3e\u4f7f\u7528\u5e7f\u6cdb\u7684\u538b\u7f29\u5de5\u5177\uff0c\u6587 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1188"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=1188"}],"version-history":[{"count":12,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1188\/revisions"}],"predecessor-version":[{"id":9265,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1188\/revisions\/9265"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=1188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=1188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=1188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}