{"id":111934,"date":"2026-10-02T09:08:53","date_gmt":"2026-10-02T01:08:53","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/111934.html"},"modified":"2026-10-02T09:08:53","modified_gmt":"2026-10-02T01:08:53","slug":"deepseek%e6%80%bb%e7%bb%93%e7%9a%84pivco-huffman%e7%bc%96%e7%a0%81%e6%80%a7%e8%83%bd%e4%bc%98%e5%8c%96","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/111934.html","title":{"rendered":"DeepSeek\u603b\u7ed3\u7684PIVCO-Huffman\u7f16\u7801\u6027\u80fd\u4f18\u5316"},"content":{"rendered":"<p>PIVCO-Huffman<\/p>\n<p>&#x1f6a7; WIP \u2014 \u8fdb\u884c\u4e2d &#x1f6a7;<\/p>\n<p>PivCo-Huffman \u662f\u4e00\u4e2a\u4f18\u5316 Huffman \u7f16\u7801\u6027\u80fd\u7684\u7814\u7a76\u9879\u76ee\u3002\u867d\u7136\u5b83\u63d0\u4f9b\u4e86\u5e93\u548c\u5927\u91cf\u4ee3\u7801&#xff0c;\u4f46\u8fdc\u672a\u8fbe\u5230\u751f\u4ea7\u5c31\u7eea\u7684\u7a0b\u5ea6\u3002<\/p>\n<p>\u8bba\u6587&#xff08;HTML\u3001PDF&#xff09;\u662f\u6743\u5a01\u7684\u8be6\u7ec6\u9610\u8ff0&#xff1b;\u672c README \u662f\u7b80\u77ed\u6458\u8981\u3002<\/p>\n<p>TL;DR<\/p>\n<p>\u5728 Apple M4 \u4e0a\u7684\u5177\u4f53\u6570\u636e&#xff0c;pivco_bu \u89e3\u7801 vs huf0_x2&#xff1a;<\/p>\n<ul>\n<li>proba80 \u9ad8\u5ea6\u503e\u659c&#xff1a;15.3 GB\/s&#xff0c;\u662f huf0_x2 \u7684 5.9 \u500d\u3002<\/li>\n<li>proba50 \/ proba14&#xff1a;9.2 \/ 5.2 GB\/s&#xff0c;3.6 \u500d \/ 2.1 \u500d\u3002<\/li>\n<li>flat_M* \u5b8c\u5168\u5e73\u5766&#xff1a;20\u201324 GB\/s&#xff0c;4.1\u20134.8 \u500d\u3002<\/li>\n<li>english \/ prose_pride \/ html_wiki \/ chinese_text \u771f\u5b9e\u6587\u672c&#xff1a;4.3\u20134.8 GB\/s&#xff0c;\u662f huf0_x2 \u7684 2.0\u20132.5 \u500d\u3002<\/li>\n<li>gzip_random \/ image_jpeg \u9ad8\u71b5&#xff1a;4.1\u20134.9 GB\/s&#xff0c;2.7\u20133.2 \u500d\u3002<\/li>\n<\/ul>\n<p>PHA&#xff08;PH &#043; \u6bcf\u8282\u70b9 FSE\/ANS \u7f16\u7801\u7684\u5206\u533a\u4f4d\u56fe&#xff09;\u4ee5\u90e8\u5206\u89e3\u7801\u5e26\u5bbd\u6362\u53d6\u503e\u659c\u6570\u636e\u4e0a\u66f4\u597d\u7684\u538b\u7f29\u7387&#xff08;M4 \u6570\u636e&#xff1b;huf0 \/ oo-huff \u4ea7\u751f\u76f8\u540c\u7684 Huffman \u538b\u7f29\u7387&#xff09;&#xff1a;<\/p>\n<ul>\n<li>proba80&#xff1a;\u538b\u7f29\u7387 8.45 \u500d vs huf0 \/ oo-huff \u7684 6.40 \u500d&#xff08;&#043;32%&#xff09;&#xff1b;\u89e3\u7801 5.9 GB\/s&#xff0c;\u4ecd\u662f huf0_x2 \u7684 2.2 \u500d\u3002<\/li>\n<li>calgary_pic&#xff08;\u771f\u5b9e\u7684 proba80 \u5f62\u6001 1bpp \u626b\u63cf\u9875&#xff09;&#xff1a;\u538b\u7f29\u7387 6.13 \u500d vs 4.79 \u500d&#xff08;&#043;28%&#xff09;&#xff1b;\u89e3\u7801 6.4 GB\/s&#xff0c;\u662f huf0_x2 \u7684 2.6 \u500d\u3002<\/li>\n<li>\u4e2d\u7b49\u71b5 \/ \u771f\u5b9e\u6587\u672c\u5206\u5e03&#xff08;english\u3001prose_pride\u3001html_wiki\u3001image_jpeg&#xff09;&#xff1a;\u5f53\u5206\u533a\u4f4d\u56fe\u4e0d\u503e\u659c\u65f6&#xff0c;FSE \u95e8\u63a7\u4e0d\u4f1a\u89e6\u53d1&#xff0c;\u56e0\u6b64 PHA \u7684\u538b\u7f29\u7387\u5728\u666e\u901a Huffman \u7684 \u00b11% \u4ee5\u5185\u3002PHA \u662f\u538b\u7f29\u7387\u7684\u5b89\u5168\u9ed8\u8ba4\u9009\u62e9&#xff0c;PH \u662f\u5cf0\u503c\u89e3\u7801\u5e26\u5bbd\u7684\u9009\u62e9\u3002<\/li>\n<\/ul>\n<p>\u8de8 ISA \u5cf0\u503c\u500d\u7387\u968f SIMD \u539f\u8bed\u5bbd\u5ea6\u6269\u5c55&#xff1a;Xeon AVX-512 1.43\u201313.8 \u500d \u00b7 Apple M4 NEON 1.43\u201310.7 \u500d \u00b7 Graviton 4 NEON 1.29\u20138.59 \u500d \u00b7 Zen 3 SSE\/AVX2 0.94\u201322.5 \u500d&#xff08;\u4e09\u884c\u6df1\u5c42\u771f\u5b9e\u6587\u672c\u5728 Zen 3 \u4e0a\u843d\u540e\u7ea6 6%&#xff09;\u3002<\/p>\n<p>\u7f16\u7801\u5927\u5c0f\u5728\u4f20\u7edf Huffman \u7684 1\u20134% \u4ee5\u5185\u3002<\/p>\n<p>\u6bcf\u4e3b\u673a\u8868\u683c\u3001\u65b9\u6cd5\u4ee5\u53ca\u6574\u4e2a\u57fa\u51c6\u6d4b\u8bd5\u7f51\u683c\u7684\u89c2\u5bdf\u7ed3\u679c\u5728 docs\/BENCHMARKS.md \u4e2d\u3002<\/p>\n<p>\u4ec0\u4e48\u662f PIVCO-Huffman&#xff1f;<\/p>\n<p>PIVCO-Huffman \u5c06 PIVoted COding&#xff08;\u67a2\u8f74\u7f16\u7801&#xff09;\u65b9\u6cd5\u5e94\u7528\u4e8e Huffman\u3002PIVCO \u4e0d\u662f\u901a\u8fc7\u8868\u67e5\u627e\u4e00\u6b21\u89e3\u7801\u4e00\u4e2a\u7b26\u53f7&#xff0c;\u800c\u662f\u540c\u65f6\u5904\u7406\u6574\u4e2a N \u4e2a\u7b26\u53f7\u7684\u5757&#xff0c;\u4f7f\u7528\u4e24\u79cd\u4e92\u8865\u7b56\u7565\u4e2d\u66f4\u9002\u5408\u6bcf\u4e2a Huffman \u5b50\u6811\u5f62\u6001\u7684\u90a3\u4e00\u79cd&#xff1a;<\/p>\n<ul>\n<li>SIMD \u6811\u904d\u5386\u5206\u533a&#xff0c;\u7528\u4e8e\u6df7\u5408\u6df1\u5ea6\u5b50\u6811&#xff0c;\u5b83\u6839\u636e\u6bcf\u4e2a\u5185\u90e8\u8282\u70b9\u7684\u4f4d\u56fe\u62c6\u5206\u5757\u7684\u7d22\u5f15\u96c6\u5e76\u9012\u5f52&#xff1b;<\/li>\n<li>\u5e73\u5766\u5b50\u6811\u5feb\u901f\u8def\u5f84&#xff0c;\u7528\u4e8e\u6240\u6709\u53f6\u5b50\u90fd\u4f4d\u4e8e\u76f8\u540c\u76f8\u5bf9\u6df1\u5ea6\u7684\u5b50\u6811&#xff0c;\u5b83\u7528\u6bcf\u4e2a\u5143\u7d20\u4e00\u4e2a\u6253\u5305\u7684 D \u4f4d\u7801\u548c\u5e95\u90e8\u4e00\u6b21\u76f4\u63a5\u7684 code_to_sym[code] \u67e5\u627e\u6765\u66ff\u4ee3\u4e00\u7cfb\u5217\u9010\u5c42\u4f4d\u56fe\u3002<\/li>\n<\/ul>\n<p>\u68c0\u6d4b\u548c\u5206\u6d3e\u5728 pivco_huffman_build_table \u65f6\u53d1\u751f\u4e00\u6b21\u2014\u2014\u7f16\u7801\u5668\u904d\u5386\u6811\u5e76\u6807\u8bb0\u6bcf\u4e2a\u6700\u5927\u5e73\u5766\u5b50\u6811&#xff08;local_min_depth &#061;&#061; local_max_depth &gt;&#061; 2&#xff09;&#xff0c;\u4e3a\u6bcf\u4e2a\u5e73\u5766\u5b50\u6811\u9884\u8ba1\u7b97 code_to_sym&#xff0c;\u7f16\u7801\u5668\u548c\u89e3\u7801\u5668\u90fd\u67e5\u8be2\u8fd9\u4e9b\u6807\u5fd7\u4ee5\u5728\u6bcf\u4e2a\u8282\u70b9\u9009\u62e9\u6b63\u786e\u7684\u8def\u5f84\u3002<\/p>\n<p>\u5b8c\u6574\u7684\u7b97\u6cd5\u63cf\u8ff0\u3001\u52a8\u673a\u548c\u5206\u6790\u5728\u8bba\u6587\u4e2d\u3002\u7ed9\u597d\u5947\u8bfb\u8005\u7684\u6307\u5f15&#xff1a;<\/p>\n<ul>\n<li>\u7ebf\u683c\u5f0f \u2014 docs\/DATA_FORMAT.md \u548c src\/pivco_huffman_wire.h\u3002<\/li>\n<li>SIMD \u5185\u6838\u8d70\u67e5 \u2014 docs\/KERNELS.md&#xff08;NEON partition_8\u3001tree_merge\u3001flat_dN_unpack \u53ca\u793a\u4f8b&#xff09;\u3002<\/li>\n<li>\u6bcf\u4e2a\u539f\u8bed\u7684\u5fae\u57fa\u51c6\u6210\u672c \u2014 docs\/KEY-PRIMITIVES.md\u3002<\/li>\n<li>\u6027\u80fd\u5206\u6790\u7b14\u8bb0&#xff08;\u5386\u53f2&#xff09; \u2014 docs\/PROFILING.md\u3002<\/li>\n<li>\u5757\u5927\u5c0f\u626b\u63cf \u2014 docs\/BLOCK_SIZE.md\u3002<\/li>\n<li>\u76f8\u5173\u5de5\u4f5c &#043; \u5c0f\u6ce2\u6811\u8054\u7cfb \u2014 docs\/RELATED-WORK.md \u548c docs\/WAVELET_TREES.md\u3002<\/li>\n<li>\u6d4b\u8bd5\u6570\u636e\u96c6 \u2014 extras\/datasets\/&#xff08;\u5408\u6210 &#043; \u771f\u5b9e\u4e16\u754c\u5206\u5e03&#xff09;\u3002<\/li>\n<li>\u4f18\u5316\u60f3\u6cd5\u65e5\u5fd7 \u2014 IDEAS.md&#xff08;\u5df2\u53d1\u5e03 \/ \u5df2\u4e22\u5f03 \/ \u5f00\u653e&#xff0c;\u542b\u5468\u671f\u7ea7\u5206\u6790&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u57fa\u7ebf<\/p>\n<p>\u57fa\u51c6\u6d4b\u8bd5\u7f51\u683c\u5c06 PIVCO-Huffman \u89e3\u7801\u4e0e\u6211\u4eec\u8ba4\u4e3a\u662f\u4e1a\u754c\u6700\u5148\u8fdb\u7684\u4e24\u79cd\u751f\u4ea7\u7ea7 Huffman \u89e3\u7801\u5668\u8fdb\u884c\u6bd4\u8f83&#xff1a;<\/p>\n<ul>\n<li>huf0 \u2014 cyan4973\/FiniteStateEntropy&#xff0c;zstd \u4e2d\u7684 Huffman \u89e3\u7801\u5668\u30024 \u6d41\u4ea4\u9519&#xff0c;11 \u4f4d\u4e3b\u8868&#xff08;X1&#xff09;\u6216 11&#043;5 \u4f4d\u53cc\u67e5\u627e&#xff08;X2&#xff09;\u3002\u539f\u7248\u81ea\u52a8\u5206\u6d3e\u662f\u9ed8\u8ba4\u7684\u5934\u6761\u57fa\u7ebf\u3002<\/li>\n<li>oo-huff \u2014 Oodle \u7684 newlz_arrays_huff&#xff08;RAD \u53d1\u5e03\u7684 OodleUE \u6e90\u7801&#xff09;&#xff0c;6 \u6d41\u624b\u5de5\u8c03\u4f18 ASM\u3002\u88ab\u8ba4\u4e3a\u662f Huffman \u89e3\u7801\u7684\u7edd\u5bf9 SotA\u3002\u5f53 Oodle SDK \u7b26\u53f7\u94fe\u63a5\u5728 ext\/oodle \u65f6\u94fe\u63a5\u5230 bench\/bench_fair.c\u3002<\/li>\n<\/ul>\n<p>\u8f83\u65e7\u7684\u9057\u7559\u57fa\u7ebf&#xff08;\u6811\u5185 trad_1s \/ trad_4s 4 \u6d41\u53c2\u8003\u89e3\u7801\u5668&#xff09;\u5df2\u4ece\u5934\u6761\u8868\u683c\u4e2d\u9000\u5f79\u3002ph \u662f\u4e0e\u4eba\u4eec\u5b9e\u9645\u53d1\u5e03\u7684\u4e24\u79cd\u7f16\u89e3\u7801\u5668\u8fdb\u884c\u5bf9\u6bd4\u5b9a\u4f4d\u7684\u3002<\/p>\n<p>\u6784\u5efa\u4e0e\u6d4b\u8bd5<\/p>\n<p><span class=\"token comment\"># \u524d\u7f6e\u6761\u4ef6&#xff08;\u4ec5\u9996\u6b21&#xff09;<\/span><br \/>\n<span class=\"token function\">git<\/span> submodule update <span class=\"token parameter variable\">&#8211;init<\/span> ext\/fse   <span class=\"token comment\"># FSE \u71b5\u7f16\u7801\u5668&#xff08;PHA \u5fc5\u9700&#xff09;<\/span><\/p>\n<p><span class=\"token comment\"># \u6784\u5efa<\/span><br \/>\ncmake <span class=\"token parameter variable\">-B<\/span> build <span class=\"token parameter variable\">-DCMAKE_BUILD_TYPE<\/span><span class=\"token operator\">&#061;<\/span>Release<br \/>\ncmake <span class=\"token parameter variable\">&#8211;build<\/span> build<\/p>\n<p><span class=\"token comment\"># \u6d4b\u8bd5<\/span><br \/>\n.\/build\/pivco_huffman_tests<\/p>\n<p><span class=\"token comment\"># \u57fa\u51c6\u6d4b\u8bd5&#xff08;\u53c2\u6570 &#061; \u6bcf\u6b21\u8fd0\u884c\u7684\u91cd\u590d\u6b21\u6570&#xff0c;\u9ed8\u8ba4 100&#xff09;<\/span><br \/>\n.\/build\/pivco_huffman_bench <span class=\"token number\">20<\/span>      <span class=\"token comment\"># \u5feb\u901f<\/span><br \/>\n.\/build\/pivco_huffman_bench <span class=\"token number\">100<\/span>     <span class=\"token comment\"># \u5f7b\u5e95<\/span><\/p>\n<p>\u5728\u4f60\u81ea\u5df1\u7684\u6570\u636e\u4e0a\u8bd5\u7528<\/p>\n<p>PIVCO-Huffman \u53ef\u4f5c\u4e3a\u5e93\u4f7f\u7528\u2014\u2014\u4f60\u4e0d\u5fc5\u91c7\u7528\u6211\u4eec\u7684\u6587\u4ef6\u683c\u5f0f\u6765\u6d4b\u91cf\u5b83\u3002\u4e09\u79cd\u65b9\u5f0f&#xff0c;\u4ece\u6700\u7b80\u5355\u5f00\u59cb&#xff1a;<\/p>\n<p>CLI \u2014 pivcohuf \u538b\u7f29\u6587\u4ef6\u5e76\u6253\u5370\u5927\u5c0f \/ \u538b\u7f29\u7387 \/ \u65f6\u95f4 \/ \u5e26\u5bbd&#xff1a;<\/p>\n<p>.\/build\/pivcohuf c  yourfile         <span class=\"token comment\"># PH   -&gt; yourfile.ph<\/span><br \/>\n.\/build\/pivcohuf c <span class=\"token parameter variable\">-a<\/span> yourfile       <span class=\"token comment\"># PHA  &#xff08;ANS \u7f16\u7801\u4f4d\u56fe&#xff1b;\u503e\u659c\u6570\u636e\u4e0a\u538b\u7f29\u7387\u66f4\u597d&#xff09;<\/span><br \/>\n.\/build\/pivcohuf d  yourfile.ph      <span class=\"token comment\"># \u89e3\u538b&#xff08;\u81ea\u52a8\u68c0\u6d4b PH vs PHA&#xff09;<\/span><\/p>\n<p>\u793a\u4f8b \u2014 examples\/try.c&#xff08;CMake \u76ee\u6807 pivco_try&#xff09;\u7528 PH \u548c PHA \u538b\u7f29\u4e00\u4e2a\u6587\u4ef6\u5e76\u62a5\u544a\u538b\u7f29\u7387 &#043; \u7f16\u7801\/\u89e3\u7801\u541e\u5410\u91cf&#xff1a;<\/p>\n<p>.\/build\/pivco_try yourfile<br \/>\n<span class=\"token comment\">#   yourfile (2000000 bytes)   [ratio &#061; in\/out, higher &#061; better]<\/span><br \/>\n<span class=\"token comment\">#     ph    6.28x  (2000000 -&gt; 318379)   enc 704 MB\/s   dec 5405 MB\/s   roundtrip ok<\/span><br \/>\n<span class=\"token comment\">#     pha   8.44x  (2000000 -&gt; 236833)   enc 495 MB\/s   dec 3578 MB\/s   roundtrip ok<\/span><\/p>\n<p>\u5e93 \u2014 \u94fe\u63a5 libpivco_huffman.a \u5e76\u8c03\u7528 include\/pivcohuf_file.h \u4e2d\u7684\u7f13\u51b2\u533a API&#xff08;\u65e0\u9700\u4e86\u89e3\u7ebf\u683c\u5f0f&#xff09;&#xff1a;<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&#034;pivcohuf_file.h&#034;<\/span><\/span><br \/>\n<span class=\"token class-name\">size_t<\/span> cap <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">pivcohuf_compress_bound<\/span><span class=\"token punctuation\">(<\/span>in_len<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token class-name\">uint8_t<\/span> <span class=\"token operator\">*<\/span>out <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">malloc<\/span><span class=\"token punctuation\">(<\/span>cap<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token class-name\">size_t<\/span> out_len <span class=\"token operator\">&#061;<\/span> cap<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">pivcohuf_compress_ex<\/span><span class=\"token punctuation\">(<\/span>in<span class=\"token punctuation\">,<\/span> in_len<span class=\"token punctuation\">,<\/span> out<span class=\"token punctuation\">,<\/span> <span class=\"token operator\">&amp;<\/span>out_len<span class=\"token punctuation\">,<\/span> <span class=\"token comment\">\/*use_ans&#061;*\/<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>   <span class=\"token comment\">\/\/ PHA; 0 &#061; PH<\/span><\/p>\n<p><span class=\"token class-name\">size_t<\/span> usz<span class=\"token punctuation\">;<\/span> <span class=\"token function\">pivcohuf_peek_uncompressed_size<\/span><span class=\"token punctuation\">(<\/span>out<span class=\"token punctuation\">,<\/span> out_len<span class=\"token punctuation\">,<\/span> <span class=\"token operator\">&amp;<\/span>usz<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token class-name\">uint8_t<\/span> <span class=\"token operator\">*<\/span>dec <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">malloc<\/span><span class=\"token punctuation\">(<\/span>usz<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token class-name\">size_t<\/span> dlen <span class=\"token operator\">&#061;<\/span> usz<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">pivcohuf_decompress<\/span><span class=\"token punctuation\">(<\/span>out<span class=\"token punctuation\">,<\/span> out_len<span class=\"token punctuation\">,<\/span> dec<span class=\"token punctuation\">,<\/span> <span class=\"token operator\">&amp;<\/span>dlen<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>                    <span class=\"token comment\">\/\/ \u81ea\u52a8\u68c0\u6d4b PH\/PHA<\/span><\/p>\n<p>\u8981\u5c06\u7f16\u89e3\u7801\u5668\u5d4c\u5165\u4f60\u81ea\u5df1\u7684\u5bb9\u5668\/\u5e27\u683c\u5f0f&#xff0c;\u8bf7\u4f7f\u7528 include\/pivco_huffman.h \u4e2d\u7684\u5757\u539f\u8bed&#xff08;\u5148 pivco_huffman_build_table&#xff0c;\u7136\u540e\u5bf9 PIVCO_BLOCK_SIZE \u7b26\u53f7\u5757\u8c03\u7528 pivco_huffman_encode \/ pivco_huffman_decode&#xff1b;\u4e3a PHA \u8c03\u7528 pivco_huffman_set_fse_enabled(1)&#xff09;\u3002<\/p>\n<p>\u7f16\u8bd1\u65f6\u81ea\u5b9a\u4e49\u5757\u5927\u5c0f&#xff1a;<\/p>\n<p>cmake <span class=\"token parameter variable\">-B<\/span> build <span class=\"token parameter variable\">-DCMAKE_BUILD_TYPE<\/span><span class=\"token operator\">&#061;<\/span>Release <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token parameter variable\">-DCMAKE_C_FLAGS<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;-DPIVCO_BLOCK_SIZE&#061;16384&#034;<\/span><\/p>\n<p>\u4e0e zstd \/ FSE \u4e00\u8d77\u94fe\u63a5 \u2014 libpivco_huffman.a \u5185\u7f6e\u4e86 FiniteStateEntropy&#xff08;FSE_*\/HUF_*\/HIST_*\/g_debuglevel&#xff09;&#xff0c;\u56e0\u6b64\u5c06\u5176\u94fe\u63a5\u5230\u4efb\u4f55\u4e5f\u5185\u7f6e FSE \u7684\u4e1c\u897f&#xff08;zstd\u3001lz4 \u7684\u71b5\u5c42\u2026\u2026&#xff09;\u65c1\u8fb9\u4f1a\u9047\u5230\u91cd\u590d\u7b26\u53f7\u9519\u8bef\u3002\u5bf9\u4e8e\u8fd9\u79cd\u60c5\u51b5&#xff0c;\u6784\u5efa\u4f1a\u751f\u6210\u4e00\u4e2a\u53ef\u76f4\u63a5\u66ff\u6362\u7684\u53ef\u91cd\u5b9a\u4f4d\u5bf9\u8c61 build\/libpivco_huffman_local.o&#xff0c;\u5176\u4e2d\u8fd9\u4e9b\u7b26\u53f7\u88ab\u672c\u5730\u5316&#xff0c;\u800c pivco \u7684\u516c\u5171 pivco_*\/pivcohuf_* API \u4fdd\u6301\u5168\u5c40\u2014\u2014\u94fe\u63a5\u5b83\u800c\u4e0d\u662f .a&#xff0c;\u51b2\u7a81\u5c31\u6d88\u5931\u4e86&#xff1a;<\/p>\n<p>cmake <span class=\"token parameter variable\">&#8211;build<\/span> build <span class=\"token parameter variable\">&#8211;target<\/span> pivco_huffman_local   <span class=\"token comment\"># \u9ed8\u8ba4\u4e5f\u4f1a\u6784\u5efa<\/span><br \/>\ncc your_app.c build\/libpivco_huffman_local.o <span class=\"token parameter variable\">-Iinclude<\/span> <span class=\"token parameter variable\">-o<\/span> your_app<\/p>\n<p>\u4f8b\u5982 extras\/phaz \u5c31\u662f\u8fd9\u6837\u94fe\u63a5\u7684\u3002<\/p>\n<p>\u4ea4\u4e92\u5f0f\u6811\u53ef\u89c6\u5316<\/p>\n<p>figures\/tree_viz.html \u662f\u4e00\u4e2a\u81ea\u5305\u542b\u7684 HTML\/JS \u63a2\u7d22\u5668&#xff0c;\u7528\u4e8e\u67e5\u770b Huffman \u6811\u5e76\u53e0\u52a0\u5e73\u5766\u5b50\u6811\u5feb\u901f\u8def\u5f84\u3002\u5b83\u4ece figures\/tree_viz_data.js \u52a0\u8f7d 29 \u4e2a\u57fa\u51c6\u5206\u5e03&#xff08;\u7531 .\/build\/pivco_dump_distributions &gt; figures\/tree_viz_data.js \u91cd\u65b0\u751f\u6210&#xff09;&#xff0c;\u63a5\u53d7\u6587\u4ef6\/\u6587\u672c\u4e0a\u4f20&#xff0c;\u5e76\u5141\u8bb8\u4f60\u5207\u6362\u5e73\u5766\u5b50\u6811\u68c0\u6d4b\u3001\u70b9\u51fb\u5e73\u5766\u6839\u6765&#xff08;\u53d6\u6d88&#xff09;\u6241\u5e73\u5316\u4ee5\u8fdb\u884c ops\/leaf \u548c\u94fe\u5f0f\u89c4\u5219\u71b5\u603b\u8ba1\u7684\u5047\u8bbe\u5206\u6790&#xff0c;\u4ee5\u53ca\u62d6\u52a8\u6700\u5927\u7801\u957f\u6ed1\u5757\u3002\u76f4\u63a5\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u8be5\u6587\u4ef6\u2014\u2014\u65e0\u9700\u6784\u5efa\u670d\u52a1\u5668\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PIVCO-Huffman<br \/>\n&#x1f6a7; WIP \u2014 \u8fdb\u884c\u4e2d &#x1f6a7;<br \/>\nPivCo-Huffman \u662f\u4e00\u4e2a\u4f18\u5316 Huffman \u7f16\u7801\u6027\u80fd\u7684\u7814\u7a76\u9879\u76ee\u3002\u867d\u7136\u5b83\u63d0\u4f9b\u4e86\u5e93\u548c\u5927\u91cf\u4ee3\u7801&#xff0c;\u4f46\u8fdc\u672a\u8fbe\u5230\u751f\u4ea7\u5c31\u7eea\u7684\u7a0b\u5ea6\u3002<br \/>\n\u8bba\u6587&#xff08;HTML\u3001PDF&#xff09;\u662f\u6743\u5a01\u7684\u8be6\u7ec6\u9610\u8ff0&#xff1b;\u672c README \u662f\u7b80\u77ed\u6458\u8981\u3002<br \/>\nTL;DR<br \/>\n\u5728 Apple M4 \u4e0a\u7684\u5177\u4f53\u6570\u636e&#xff0c;pivco_bu \u89e3\u7801 vs huf0_x2&#xff1a;<br \/>\nprob<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11653,55,1813,427],"topic":[],"class_list":["post-111934","post","type-post","status-publish","format-standard","hentry","category-server","tag-11653","tag-c","tag-1813","tag-427"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>DeepSeek\u603b\u7ed3\u7684PIVCO-Huffman\u7f16\u7801\u6027\u80fd\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/111934.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DeepSeek\u603b\u7ed3\u7684PIVCO-Huffman\u7f16\u7801\u6027\u80fd\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"PIVCO-Huffman &#x1f6a7; WIP \u2014 \u8fdb\u884c\u4e2d &#x1f6a7; PivCo-Huffman \u662f\u4e00\u4e2a\u4f18\u5316 Huffman \u7f16\u7801\u6027\u80fd\u7684\u7814\u7a76\u9879\u76ee\u3002\u867d\u7136\u5b83\u63d0\u4f9b\u4e86\u5e93\u548c\u5927\u91cf\u4ee3\u7801&#xff0c;\u4f46\u8fdc\u672a\u8fbe\u5230\u751f\u4ea7\u5c31\u7eea\u7684\u7a0b\u5ea6\u3002 \u8bba\u6587&#xff08;HTML\u3001PDF&#xff09;\u662f\u6743\u5a01\u7684\u8be6\u7ec6\u9610\u8ff0&#xff1b;\u672c README \u662f\u7b80\u77ed\u6458\u8981\u3002 TL;DR \u5728 Apple M4 \u4e0a\u7684\u5177\u4f53\u6570\u636e&#xff0c;pivco_bu \u89e3\u7801 vs huf0_x2&#xff1a; prob\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/111934.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-02T01:08:53+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/111934.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/111934.html\",\"name\":\"DeepSeek\u603b\u7ed3\u7684PIVCO-Huffman\u7f16\u7801\u6027\u80fd\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-02T01:08:53+00:00\",\"dateModified\":\"2026-10-02T01:08:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/111934.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/111934.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/111934.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DeepSeek\u603b\u7ed3\u7684PIVCO-Huffman\u7f16\u7801\u6027\u80fd\u4f18\u5316\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DeepSeek\u603b\u7ed3\u7684PIVCO-Huffman\u7f16\u7801\u6027\u80fd\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/111934.html","og_locale":"zh_CN","og_type":"article","og_title":"DeepSeek\u603b\u7ed3\u7684PIVCO-Huffman\u7f16\u7801\u6027\u80fd\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"PIVCO-Huffman &#x1f6a7; WIP \u2014 \u8fdb\u884c\u4e2d &#x1f6a7; PivCo-Huffman \u662f\u4e00\u4e2a\u4f18\u5316 Huffman \u7f16\u7801\u6027\u80fd\u7684\u7814\u7a76\u9879\u76ee\u3002\u867d\u7136\u5b83\u63d0\u4f9b\u4e86\u5e93\u548c\u5927\u91cf\u4ee3\u7801&#xff0c;\u4f46\u8fdc\u672a\u8fbe\u5230\u751f\u4ea7\u5c31\u7eea\u7684\u7a0b\u5ea6\u3002 \u8bba\u6587&#xff08;HTML\u3001PDF&#xff09;\u662f\u6743\u5a01\u7684\u8be6\u7ec6\u9610\u8ff0&#xff1b;\u672c README \u662f\u7b80\u77ed\u6458\u8981\u3002 TL;DR \u5728 Apple M4 \u4e0a\u7684\u5177\u4f53\u6570\u636e&#xff0c;pivco_bu \u89e3\u7801 vs huf0_x2&#xff1a; prob","og_url":"https:\/\/www.wsisp.com\/helps\/111934.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-02T01:08:53+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/111934.html","url":"https:\/\/www.wsisp.com\/helps\/111934.html","name":"DeepSeek\u603b\u7ed3\u7684PIVCO-Huffman\u7f16\u7801\u6027\u80fd\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-02T01:08:53+00:00","dateModified":"2026-10-02T01:08:53+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/111934.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/111934.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/111934.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"DeepSeek\u603b\u7ed3\u7684PIVCO-Huffman\u7f16\u7801\u6027\u80fd\u4f18\u5316"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/111934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=111934"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/111934\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=111934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=111934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=111934"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=111934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}