{"id":51978,"date":"2024-12-03T09:42:38","date_gmt":"2024-12-03T01:42:38","guid":{"rendered":"https:\/\/fwq.ai\/blog\/51978\/"},"modified":"2024-12-03T09:42:38","modified_gmt":"2024-12-03T01:42:38","slug":"linux%e5%91%bd%e4%bb%a4%e4%b9%8blz4%e5%91%bd%e4%bb%a4%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/51978\/","title":{"rendered":"Linux\u547d\u4ee4\u4e4blz4\u547d\u4ee4\u5982\u4f55\u4f7f\u7528"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>Linux\u547d\u4ee4\u4e4blz4\u547d\u4ee4\u5982\u4f55\u4f7f\u7528<\/h1>\n<p>\u73cd\u60dc\u65f6\u95f4\uff0c\u52e4\u594b\u5b66\u4e60\uff01\u4eca\u5929\u7ed9\u5927\u5bb6\u5e26\u6765<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aLinux\u547d\u4ee4\u4e4blz4\u547d\u4ee4\u5982\u4f55\u4f7f\u7528\u300b<\/span>\uff0c\u6b63\u6587\u5185\u5bb9\u4e3b\u8981\u6d89\u53ca\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\uff0c\u5982\u679c\u4f60\u6b63\u5728\u5b66\u4e60<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\uff0c\u6216\u8005\u662f\u5bf9<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u6709\u7591\u95ee\uff0c\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u6211\uff01\u540e\u9762\u6211\u4f1a\u6301\u7eed\u66f4\u65b0\u76f8\u5173\u5185\u5bb9\u7684\uff0c\u5e0c\u671b\u90fd\u80fd\u5e2e\u5230\u6b63\u5728\u5b66\u4e60\u7684\u5927\u5bb6\uff01<\/p>\n<h3>\u4e00\u3001lz4\u547d\u4ee4\u7b80\u4ecb<\/h3>\n<p>LZ4\u662f\u4e00\u79cd\u538b\u7f29\u683c\u5f0f\uff0c\u7279\u70b9\u662f\u538b\u7f29\/\u89e3\u538b\u7f29\u901f\u5ea6\u8d85\u5feb(\u538b\u7f29\u7387\u4e0d\u5982gzip)\uff0c\u5982\u679c\u4f60\u7279\u522b\u5728\u610f\u538b\u7f29\u901f\u5ea6\uff0c\u6216\u8005\u5f53\u524d\u73af\u5883\u7684CPU\u8d44\u6e90\u7d27\u7f3a\uff0c\u53ef\u4ee5\u8003\u8651\u8fd9\u79cd\u683c\u5f0f\u3002lz4\u662f\u4e00\u79cd\u975e\u5e38\u5feb\u901f\u7684\u65e0\u635f\u538b\u7f29\u7b97\u6cd5\uff0c\u57fa\u4e8e\u5b57\u8282\u5bf9\u9f50LZ77\u7cfb\u5217\u538b\u7f29\u65b9\u6848\u3002lz4\u63d0\u4f9b\u6bcf\u6838400 MB\/s\u7684\u538b\u7f29\u901f\u5ea6\uff0c\u53ef\u901a\u8fc7\u591a\u6838CPU\u7ebf\u6027\u6269\u5c55\u3002\u5b83\u7684\u7279\u70b9\u662f\u6781\u5feb\u7684\u89e3\u7801\u5668\uff0c\u6bcf\u6838\u901f\u5ea6\u53ef\u8fbe\u591aGB\/s\uff0c\u901a\u5e38\u5728\u591a\u6838\u7cfb\u7edf\u4e0a\u8fbe\u5230RAM\u901f\u5ea6\u9650\u5236\u9879\u76ee\u3002lz4\u9075\u5faa\u4e0a\u9762\u8bf4\u5230\u7684lz77\u601d\u60f3\u7406\u8bba\uff0c\u901a\u8fc7\u6ed1\u52a8\u7a97\u53e3\u3001hash\u8868\u3001\u6570\u636e\u7f16\u7801\u7b49\u64cd\u4f5c\u5b9e\u73b0\u6570\u636e\u538b\u7f29\u3002\u538b\u7f29\u8fc7\u7a0b\u4ee5\u81f3\u5c114\u5b57\u8282\u4e3a\u626b\u63cf\u7a97\u53e3\u67e5\u627e\u5339\u914d\uff0c\u6bcf\u6b21\u79fb\u52a81\u5b57\u8282\u8fdb\u884c\u626b\u63cf\uff0c\u9047\u5230\u91cd\u590d\u7684\u5c31\u8fdb\u884c\u538b\u7f29\u3002centos7\u9ed8\u8ba4\u5b89\u88c5\u4e86lz4\u547d\u4ee4\uff0c\u53ef\u4ee5\u5b9e\u73b0lz4\u683c\u5f0f\u6587\u4ef6\u7684\u538b\u7f29\u548c\u89e3\u538b\u7f29\u3002<\/p>\n<h3>\u4e8c\u3001\u547d\u4ee4\u4f7f\u7528\u793a\u4f8b<\/h3>\n<h4>1\u3001\u67e5\u770b\u547d\u4ee4\u7248\u672c<\/h4>\n<p>lz4\u547d\u4ee4\u5b89\u88c5\u7248\u672c\u662f1.7.5<\/p>\n<blockquote>\n<p>[root@s76 ~]# lz4 -V<br \/>*** LZ4 command line interface 64-bits v1.7.5, by Yann Collet ***<\/p>\n<\/blockquote>\n<h4>2\u3001\u83b7\u53d6\u547d\u4ee4\u5e2e\u52a9<\/h4>\n<p>\u65e5\u5e38\u4f7f\u7528\u4e2d\u5982\u679c\u5fd8\u8bb0lz4\u547d\u4ee4\u8bed\u6cd5\u683c\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7lz4 &#8211;help\u6216\u8005man lz4\u547d\u4ee4\u83b7\u53d6lz4\u547d\u4ee4\u7684\u5e2e\u52a9\u4fe1\u606f\u3002<\/p>\n<blockquote>\n<p>[root@s76 ~]# lz4 &#8211;help<br \/>[root@s76 ~]# man lz4<\/p>\n<\/blockquote>\n<h4>3\u3001\u547d\u4ee4\u5b89\u88c5<\/h4>\n<p>centos7\u9ed8\u8ba4\u5b89\u88c5\u4e86lz4\u547d\u4ee4\uff0c\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u4f7f\u7528yum\u5b89\u88c5\u65b9\u5f0f\u5b89\u88c5\u8be5\u547d\u4ee4\u3002<\/p>\n<blockquote>\n<p>[root@s76 ~]# yum install -y lz4 lz4-devel<\/p>\n<\/blockquote>\n<h4>4\u3001\u538b\u7f29\u5355\u4e2a\u6587\u4ef6<\/h4>\n<blockquote>\n<p>[root@s76 ~]# lz4 anaconda-ks.cfg test.lz4<br \/>Compressed 2927 bytes into 1825 bytes ==&gt; 62.35%<\/p>\n<\/blockquote>\n<h4>5\u3001\u538b\u7f29\u591a\u4e2a\u6587\u4ef6<\/h4>\n<p>\u538b\u7f29\u591a\u4e2a\u6587\u4ef6\u4f7f\u7528\u53c2\u6570-m\uff0c\u538b\u7f29\u540e\u7684\u6587\u4ef6\u540d\u662f\u6e90\u6587\u4ef6\u52a0\u4e0alz4\u540e\u7f00\u3002lz4\u547d\u4ee4\u53ea\u53ef\u4ee5\u5c06\u5355\u4e2a\u6587\u4ef6\u538b\u7f29\uff0c\u5982\u679c\u6211\u4eec\u9700\u8981\u5c06\u591a\u4e2a\u6587\u4ef6\u538b\u7f29\u5230\u4e00\u4e2a\u6587\u4ef6\uff0c\u6211\u4eec\u9700\u8981\u5c06lz4\u548ctar\u547d\u4ee4\u7ed3\u5408\u4f7f\u7528\u3002<\/p>\n<blockquote>\n<p>[root@s76 ~]# lz4 -m anaconda-ks.cfg original-ks.cfg<br \/>[root@s76 ~]# ll<br \/>total 16<br \/>-rw&#8212;&#8212;-. 1 root root 2927 Feb 8 15:19 anaconda-ks.cfg<br \/>-rw&#8212;&#8212;-. 1 root root 1825 Feb 8 15:19 anaconda-ks.cfg.lz4<br \/>-rw&#8212;&#8212;-. 1 root root 2045 Feb 8 15:19 original-ks.cfg<br \/>-rw&#8212;&#8212;-. 1 root root 1216 Feb 8 15:19 original-ks.cfg.lz4<br \/>[root@s76 ~]# tar -cvf anaconda-ks.cfg original-ks.cfg |lz4 &#8211; 2.tar.lz4<br \/>Compressed 16 bytes into 35 bytes ==&gt; 218.75%<\/p>\n<\/blockquote>\n<h4>6\u3001\u538b\u7f29\u76ee\u5f55<\/h4>\n<p>lz4\u53ea\u80fd\u538b\u7f29\u6587\u4ef6\uff0c\u5982\u679c\u9700\u8981\u538b\u7f29\u76ee\u5f55\u9700\u8981\u7ed3\u5408tar\u547d\u4ee4\u4e00\u8d77\u3002<\/p>\n<blockquote>\n<p>[root@s76 ~]# tar cvf &#8211; test | lz4 &#8211; 1.tar.lz4<br \/>test\/<br \/>test\/1.tar<br \/>Compressed 20480 bytes into 325 bytes ==&gt; 1.59%<\/p>\n<\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20240401\/1711947635660a3f73d5cff.png\" class=\"aligncenter\" title=\"Linux\u547d\u4ee4\u4e4blz4\u547d\u4ee4\u5982\u4f55\u4f7f\u7528\u63d2\u56fe\" alt=\"Linux\u547d\u4ee4\u4e4blz4\u547d\u4ee4\u5982\u4f55\u4f7f\u7528\u63d2\u56fe\" \/><\/p>\n<h4>7\u3001\u538b\u7f29\u540e\u5220\u9664\u6e90\u6587\u4ef6<\/h4>\n<blockquote>\n<p>[root@s76 ~]# lz4 &#8211;rm hi.txt hi.txt.lz4<br \/>Compressed 5 bytes into 24 bytes ==&gt; 480.00%<br \/>[root@s76 ~]# ll<br \/>total 24<br \/>-rw-r&amp;ndash;r&amp;ndash;. 1 root root 325 Feb 12 20:57 1.tar.lz4<br \/>-rw&#8212;&#8212;-. 1 root root 10240 Feb 12 20:40 anaconda-ks.cfg<br \/>-rw-r&amp;ndash;r&amp;ndash;. 1 root root 24 Feb 12 21:01 hi.txt.lz4<br \/>-rw&#8212;&#8212;-. 1 root root 2045 Feb 8 15:19 original-ks.cfg<br \/>drwxr-xr-x. 2 root root 19 Feb 12 20:38 test<\/p>\n<\/blockquote>\n<h4>8\u3001\u89e3\u538blz4\u6587\u4ef6<\/h4>\n<blockquote>\n<p>[root@s76 ~]# lz4 -d hi.txt.lz4<br \/>Decoding file hi.txt<br \/>hi.txt.lz4 : decoded 5 bytes<br \/>[root@s76 ~]# ll<br \/>total 28<br \/>-rw-r&amp;ndash;r&amp;ndash;. 1 root root 325 Feb 12 20:57 1.tar.lz4<br \/>-rw&#8212;&#8212;-. 1 root root 10240 Feb 12 20:40 anaconda-ks.cfg<br \/>-rw-r&amp;ndash;r&amp;ndash;. 1 root root 5 Feb 12 21:01 hi.txt<br \/>-rw-r&amp;ndash;r&amp;ndash;. 1 root root 24 Feb 12 21:01 hi.txt.lz4<br \/>-rw&#8212;&#8212;-. 1 root root 2045 Feb 8 15:19 original-ks.cfg<br \/>drwxr-xr-x. 2 root root 19 Feb 12 20:38 test<\/p>\n<\/blockquote>\n<h4>9\u3001\u89e3\u538b\u5e76\u5220\u9664\u538b\u7f29\u6587\u4ef6<\/h4>\n<blockquote>\n<p>[root@s76 ~]# lz4 &#8211;rm -d hi.txt.lz4<br \/>Decoding file hi.txt<br \/>hi.txt.lz4 : decoded 5 bytes<br \/>[root@s76 ~]# ll<br \/>total 24<br \/>-rw-r&amp;ndash;r&amp;ndash;. 1 root root 325 Feb 12 20:57 1.tar.lz4<br \/>-rw&#8212;&#8212;-. 1 root root 10240 Feb 12 20:40 anaconda-ks.cfg<br \/>-rw-r&amp;ndash;r&amp;ndash;. 1 root root 5 Feb 12 21:01 hi.txt<br \/>-rw&#8212;&#8212;-. 1 root root 2045 Feb 8 15:19 original-ks.cfg<br \/>drwxr-xr-x. 2 root root 19 Feb 12 20:38 test<\/p>\n<\/blockquote>\n<h4>10\u3001\u9ad8\u538b\u7f29\u6bd4\u65b9\u5f0f\u538b\u7f29<\/h4>\n<blockquote>\n<p>[root@s76 ~]# lz4 -9 hi.txt hi.txt.lz4<br \/>Compressed 5 bytes into 24 bytes ==&gt; 480.00%<\/p>\n<\/blockquote>\n<h4>11\u3001\u538b\u7f29\u5e76\u8986\u76d6\u6587\u4ef6<\/h4>\n<blockquote>\n<p>[root@s76 ~]# lz4 hi.txt.lz4 hi.txt<br \/>hi.txt already exists; do you wish to overwrite (y\/N) ? y<br \/>Compressed 24 bytes into 43 bytes ==&gt; 179.17%<br \/>[root@s76 ~]# lz4 -f hi.txt.lz4 hi.txt<br \/>Compressed 24 bytes into 43 bytes ==&gt; 179.17%<\/p>\n<\/blockquote>\n<h4>12\u3001\u89e3\u538b\u5e76\u8f93\u51fa\u6587\u4ef6<\/h4>\n<blockquote>\n<p>[root@s76 ~]# cat hi.txt<br \/>hi,wuhs<br \/>[root@s76 ~]# lz4 -dc hi.txt.lz4<br \/>hi,wuhs<\/p>\n<\/blockquote>\n<h4>13\u3001\u89e3\u538b\u901f\u5ea6\u6d4b\u8bd5<\/h4>\n<p>1\u4e2a22G\u7684\u6587\u4ef6\u89e3\u538b\u82b1\u8d39\u65f6\u95f45\u520618\u79d2\uff0c\u89e3\u538b\u540e\u7684\u5927\u5c0f\u4e3a45G\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20240401\/1711947635660a3f73d9c96.png\" class=\"aligncenter\" title=\"Linux\u547d\u4ee4\u4e4blz4\u547d\u4ee4\u5982\u4f55\u4f7f\u7528\u63d2\u56fe1\" alt=\"Linux\u547d\u4ee4\u4e4blz4\u547d\u4ee4\u5982\u4f55\u4f7f\u7528\u63d2\u56fe1\" \/><\/p>\n<h3>\u4e09\u3001lz4\u547d\u4ee4\u4f7f\u7528\u8bed\u6cd5\u53ca\u53c2\u6570\u8bf4\u660e<\/h3>\n<h4>1\u3001\u547d\u4ee4\u683c\u5f0f<\/h4>\n<blockquote>\n<p>#lz4 [arg] [input] [output]<\/p>\n<\/blockquote>\n<h4>2\u3001\u53c2\u6570\u8bf4\u660e<\/h4>\n<table>\n<thead>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u53c2\u6570\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>-1<\/td>\n<td>\u5feb\u901f\u538b\u7f29\uff08\u9ed8\u8ba4\uff09<\/td>\n<\/tr>\n<tr>\n<td>-9<\/td>\n<td>\u9ad8\u538b\u7f29<\/td>\n<\/tr>\n<tr>\n<td>-d<\/td>\n<td>\u89e3\u538b\u7f29\uff08\u9ed8\u8ba4\u4e3a.lz4\u6269\u5c55\u540d\uff09<\/td>\n<\/tr>\n<tr>\n<td>-z<\/td>\n<td>\u5f3a\u5236\u538b\u7f29<\/td>\n<\/tr>\n<tr>\n<td>-f<\/td>\n<td>\u8986\u76d6\u8f93\u51fa\u800c\u4e0d\u63d0\u793a<\/td>\n<\/tr>\n<tr>\n<td>-k<\/td>\n<td>\u4fdd\u7559\u6e90\u6587\u4ef6\uff08\u9ed8\u8ba4\uff09<\/td>\n<\/tr>\n<tr>\n<td>&amp;ndash;rm<\/td>\n<td>\u6210\u529f\u5730\u89e3\u9664\/\u538b\u7f29\u540e\u5220\u9664\u6e90\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>-h\/-H<\/td>\n<td>\u663e\u793a\u5e2e\u52a9\/\u957f\u5e2e\u52a9\u548c\u9000\u51fa<\/td>\n<\/tr>\n<tr>\n<td>-V<\/td>\n<td>\u663e\u793a\u7248\u672c\u53f7\u5e76\u9000\u51fa<\/td>\n<\/tr>\n<tr>\n<td>-v<\/td>\n<td>\u8be6\u7ec6\u6a21\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>-q<\/td>\n<td>\u53d6\u6d88\u8b66\u544a\uff1b\u6307\u5b9a\u4e24\u6b21\u4e5f\u53ef\u4ee5\u53d6\u6d88\u9519\u8bef<\/td>\n<\/tr>\n<tr>\n<td>-c<\/td>\n<td>\u5f3a\u5236\u5199\u5165\u6807\u51c6\u8f93\u51fa\uff0c\u5373\u4f7f\u5b83\u662f\u63a7\u5236\u53f0<\/td>\n<\/tr>\n<tr>\n<td>-t<\/td>\n<td>\u6d4b\u8bd5\u538b\u7f29\u6587\u4ef6\u5b8c\u6574\u6027<\/td>\n<\/tr>\n<tr>\n<td>-m<\/td>\n<td>\u591a\u4e2a\u8f93\u5165\u6587\u4ef6\uff08\u8868\u793a\u81ea\u52a8\u8f93\u51fa\u6587\u4ef6\u540d\uff09<\/td>\n<\/tr>\n<tr>\n<td>-r<\/td>\n<td>\u5728\u76ee\u5f55\u4e0a\u9012\u5f52\u64cd\u4f5c\uff08\u4e5f\u8bbe\u7f6e\u4e3a-m\uff09<\/td>\n<\/tr>\n<tr>\n<td>-l<\/td>\n<td>\u4f7f\u7528\u65e7\u683c\u5f0f\u538b\u7f29\uff08Linux\u5185\u6838\u538b\u7f29\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4ee5\u4e0a\u5c31\u662f\u300aLinux\u547d\u4ee4\u4e4blz4\u547d\u4ee4\u5982\u4f55\u4f7f\u7528\u300b\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u5173\u4e8eLinux,lz4\u7684\u8d44\u6599\u8bf7\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u547d\u4ee4\u4e4blz4\u547d\u4ee4\u5982\u4f55\u4f7f\u7528 \u73cd\u60dc\u65f6\u95f4\uff0c\u52e4\u594b\u5b66\u4e60\uff01\u4eca\u5929\u7ed9\u5927\u5bb6\u5e26\u6765\u300aLinux\u547d\u4ee4\u4e4blz4\u547d\u4ee4\u5982\u4f55\u4f7f\u7528\u300b\uff0c\u6b63\u6587\u5185\u5bb9\u4e3b\u8981\u6d89\u53ca\u5230\u7b49\u7b49\uff0c\u5982\u679c\u4f60\u6b63\u5728\u5b66\u4e60\u6587\u7ae0\uff0c\u6216\u8005\u662f\u5bf9\u6587\u7ae0\u6709\u7591\u95ee\uff0c\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u6211\uff01\u540e\u9762\u6211\u4f1a\u6301\u7eed\u66f4\u65b0\u76f8\u5173\u5185\u5bb9\u7684\uff0c\u5e0c\u671b\u90fd\u80fd\u5e2e\u5230\u6b63\u5728\u5b66\u4e60\u7684\u5927\u5bb6\uff01 \u4e00\u3001lz4\u547d\u4ee4\u7b80\u4ecb LZ4\u662f\u4e00\u79cd\u538b\u7f29\u683c\u5f0f\uff0c\u7279\u70b9\u662f\u538b\u7f29\/\u89e3\u538b\u7f29\u901f\u5ea6\u8d85\u5feb(\u538b\u7f29\u7387\u4e0d\u5982gzip)\uff0c\u5982\u679c\u4f60\u7279\u522b\u5728\u610f\u538b\u7f29\u901f\u5ea6\uff0c\u6216\u8005\u5f53\u524d\u73af\u5883\u7684CPU\u8d44\u6e90\u7d27\u7f3a\uff0c\u53ef\u4ee5\u8003\u8651\u8fd9\u79cd\u683c\u5f0f\u3002lz4\u662f\u4e00\u79cd\u975e\u5e38\u5feb\u901f\u7684\u65e0\u635f\u538b\u7f29\u7b97\u6cd5\uff0c\u57fa\u4e8e\u5b57\u8282\u5bf9\u9f50LZ77\u7cfb\u5217\u538b\u7f29\u65b9\u6848\u3002lz4\u63d0\u4f9b\u6bcf\u6838400 MB\/s\u7684\u538b\u7f29\u901f\u5ea6\uff0c\u53ef\u901a\u8fc7\u591a\u6838CPU\u7ebf\u6027\u6269\u5c55\u3002\u5b83\u7684\u7279\u70b9\u662f\u6781\u5feb\u7684\u89e3\u7801\u5668\uff0c\u6bcf\u6838\u901f\u5ea6\u53ef\u8fbe\u591aGB\/s\uff0c\u901a\u5e38\u5728\u591a\u6838\u7cfb\u7edf\u4e0a\u8fbe\u5230RAM\u901f\u5ea6\u9650\u5236\u9879\u76ee\u3002lz4\u9075\u5faa\u4e0a\u9762\u8bf4\u5230\u7684lz77\u601d\u60f3\u7406\u8bba\uff0c\u901a\u8fc7\u6ed1\u52a8\u7a97\u53e3\u3001hash\u8868\u3001\u6570\u636e\u7f16\u7801\u7b49\u64cd\u4f5c\u5b9e\u73b0\u6570\u636e\u538b\u7f29\u3002\u538b\u7f29\u8fc7\u7a0b\u4ee5\u81f3\u5c114\u5b57\u8282\u4e3a\u626b\u63cf\u7a97\u53e3\u67e5\u627e\u5339\u914d\uff0c\u6bcf\u6b21\u79fb\u52a81\u5b57\u8282\u8fdb\u884c\u626b\u63cf\uff0c\u9047\u5230\u91cd\u590d\u7684\u5c31\u8fdb\u884c\u538b\u7f29\u3002centos7\u9ed8\u8ba4\u5b89\u88c5\u4e86lz4\u547d\u4ee4\uff0c\u53ef\u4ee5\u5b9e\u73b0lz4\u683c\u5f0f\u6587\u4ef6\u7684\u538b\u7f29\u548c\u89e3\u538b\u7f29\u3002 \u4e8c\u3001\u547d\u4ee4\u4f7f\u7528\u793a\u4f8b 1\u3001\u67e5\u770b\u547d\u4ee4\u7248\u672c lz4\u547d\u4ee4\u5b89\u88c5\u7248\u672c\u662f1.7.5 [root@s76 ~]# lz4 -V*** LZ4 command line interface 64-bits v1.7.5, by Yann Collet *** 2\u3001\u83b7\u53d6\u547d\u4ee4\u5e2e\u52a9 \u65e5\u5e38\u4f7f\u7528\u4e2d\u5982\u679c\u5fd8\u8bb0lz4\u547d\u4ee4\u8bed\u6cd5\u683c\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7lz4 &#8211;help\u6216\u8005man lz4\u547d\u4ee4\u83b7\u53d6lz4\u547d\u4ee4\u7684\u5e2e\u52a9\u4fe1\u606f\u3002 [root@s76 ~]# lz4 &#8211;help[root@s76 ~]# man lz4 3\u3001\u547d\u4ee4\u5b89\u88c5 centos7\u9ed8\u8ba4\u5b89\u88c5\u4e86lz4\u547d\u4ee4\uff0c\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u4f7f\u7528yum\u5b89\u88c5\u65b9\u5f0f\u5b89\u88c5\u8be5\u547d\u4ee4\u3002 [root@s76 ~]# yum install -y lz4 lz4-devel 4\u3001\u538b\u7f29\u5355\u4e2a\u6587\u4ef6 [root@s76 ~]# lz4 anaconda-ks.cfg test.lz4Compressed 2927 bytes into 1825 bytes ==&gt; 62.35% [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-51978","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/51978","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=51978"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/51978\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=51978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=51978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=51978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}