{"id":53216,"date":"2025-08-12T07:04:25","date_gmt":"2025-08-11T23:04:25","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/53216.html"},"modified":"2025-08-12T07:04:25","modified_gmt":"2025-08-11T23:04:25","slug":"java%e5%ae%9e%e7%8e%b0%e5%ad%97%e7%ac%a6%e4%b8%b2%e6%88%96%e5%ad%97%e8%8a%82%e6%95%b0%e7%bb%84%e7%94%9f%e6%88%90-crc32-%e6%a0%a1%e9%aa%8c%e5%92%8c%e7%ae%97%e6%b3%95%ef%bc%88%e9%99%84%e5%b8%a6","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/53216.html","title":{"rendered":"JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09"},"content":{"rendered":"<h2>1. \u9879\u76ee\u80cc\u666f\u8be6\u7ec6\u4ecb\u7ecd<\/h2>\n<p>\u5faa\u73af\u5197\u4f59\u6821\u9a8c&#xff08;Cyclic Redundancy Check&#xff0c;\u7b80\u79f0 CRC&#xff09;\u662f\u4e00\u7c7b\u57fa\u4e8e\u4e8c\u8fdb\u5236\u591a\u9879\u5f0f\u9664\u6cd5\u7684\u6821\u9a8c\u7801&#xff0c;\u7528\u4e8e\u68c0\u6d4b\u6570\u636e\u5728\u4f20\u8f93\u6216\u5b58\u50a8\u8fc7\u7a0b\u4e2d\u53d1\u751f\u7684\u9519\u8bef\u3002CRC \u7684\u601d\u60f3\u662f\u628a\u6bd4\u7279\u4e32\u770b\u4f5c\u591a\u9879\u5f0f&#xff0c;\u7136\u540e\u7528\u751f\u6210\u591a\u9879\u5f0f&#xff08;generator polynomial&#xff09;\u5bf9\u6570\u636e\u591a\u9879\u5f0f\u505a\u9664\u6cd5&#xff0c;\u4f59\u6570\u5373\u4e3a CRC \u6821\u9a8c\u503c\u3002CRC \u4ee5\u5176\u5b9e\u73b0\u7b80\u5355\u3001\u8bef\u68c0\u7387\u4f4e\u548c\u8ba1\u7b97\u5f00\u9500\u5c0f\u800c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u7f51\u7edc\u534f\u8bae&#xff08;Ethernet&#xff09;\u3001\u538b\u7f29\u683c\u5f0f&#xff08;ZIP&#xff09;\u3001\u56fe\u50cf\u683c\u5f0f&#xff08;PNG&#xff09;\u3001\u6587\u4ef6\u7cfb\u7edf\u3001\u901a\u4fe1\u94fe\u8def\u4ee5\u53ca\u5d4c\u5165\u5f0f\u56fa\u4ef6\u7b49\u9886\u57df\u3002<\/p>\n<p>CRC-32 \u662f\u5e38\u89c1\u7684\u4e00\u79cd CRC&#xff0c;\u6807\u51c6\u5b9e\u73b0&#xff08;IEEE 802.3 \/ ISO-3309&#xff09;\u91c7\u7528\u751f\u6210\u591a\u9879\u5f0f 0x04C11DB7&#xff0c;\u5e38\u89c1\u7684\u5de5\u7a0b\u5b9e\u73b0\u4ee5\u53cd\u5c04&#xff08;reflected&#xff09;\u5f62\u5f0f\u51fa\u73b0&#xff0c;\u5177\u4f53\u6b65\u9aa4\u5305\u62ec&#xff1a;\u521d\u59cb\u5bc4\u5b58\u5668\u503c\u901a\u5e38\u4e3a 0xFFFFFFFF&#xff0c;\u6570\u636e\u6309\u5b57\u8282\u53cd\u5c04&#xff08;\u5373\u6bcf\u4e2a\u5b57\u8282\u7684\u4f4d\u987a\u5e8f\u5148\u53cd\u8f6c&#xff09;\u3001\u6309\u5b57\u8282\u67e5\u8868\u66f4\u65b0 CRC&#xff0c;\u6700\u540e\u5bf9 CRC \u5f02\u6216 0xFFFFFFFF \u5f97\u5230\u6700\u7ec8\u7ed3\u679c\u3002\u5bf9\u5b57\u7b26\u4e32\/\u5b57\u8282\u6570\u7ec4\u8ba1\u7b97 CRC-32 \u662f\u6587\u4ef6\u5b8c\u6574\u6027\u3001\u4f20\u8f93\u6821\u9a8c\u7684\u57fa\u7840\u529f\u80fd\u4e4b\u4e00\u3002<\/p>\n<p>\u672c\u9879\u76ee\u9762\u5411\u5b66\u4e60\u4e0e\u6559\u5b66&#xff0c;\u8981\u6c42\u4e0d\u4ec5\u63d0\u4f9b\u5de5\u7a0b\u53ef\u7528\u7684\u5b9e\u73b0&#xff08;\u5305\u62ec\u4f7f\u7528 Java \u6807\u51c6\u5e93\u7684\u4fbf\u6377\u65b9\u6cd5&#xff09;&#xff0c;\u4e5f\u8981\u63d0\u4f9b\u81ea\u5b9e\u73b0\u7684\u3001\u80fd\u8bb2\u6e05\u695a\u539f\u7406\u7684\u8868\u9a71\u52a8&#xff08;table-driven&#xff09;\u5b9e\u73b0&#xff1b;\u4ee3\u7801\u8981\u6e05\u6670\u3001\u6ce8\u91ca\u5145\u5206&#xff0c;\u4fbf\u4e8e\u8bfe\u5802\u8bb2\u89e3\u548c\u535a\u5ba2\u53d1\u5e03&#xff0c;\u5e76\u5728\u793a\u4f8b\u4e2d\u4f7f\u7528\u7ecf\u5178\u6d4b\u8bd5\u5411\u91cf &#034;123456789&#034;&#xff08;\u5176 CRC-32 \u503c\u4e3a 0xCBF43926&#xff09;\u7528\u4e8e\u9a8c\u8bc1\u5b9e\u73b0\u6b63\u786e\u6027\u3002<\/p>\n<h2>2. \u9879\u76ee\u9700\u6c42\u8be6\u7ec6\u4ecb\u7ecd<\/h2>\n<li>\n<p>\u7528 Java&#xff08;\u517c\u5bb9 Java 8&#043;&#xff09;\u5b9e\u73b0\u5bf9\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u7684 CRC-32 \u8ba1\u7b97&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u63d0\u4f9b\u4e24\u79cd\u5b9e\u73b0\u65b9\u5f0f&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u4f7f\u7528 Java \u6807\u51c6\u5e93 java.util.zip.CRC32 \u7684\u7b80\u5355\u5b9e\u73b0&#xff08;\u5de5\u7a0b\u4e2d\u63a8\u8350\u4f7f\u7528&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u81ea\u884c\u5b9e\u73b0\u7684 table-driven&#xff08;\u67e5\u8868\u52a0\u901f&#xff09;\u5b9e\u73b0&#xff0c;\u7528\u4e8e\u6559\u5b66\u4e0e\u7406\u89e3\u5e95\u5c42\u7ec6\u8282&#xff1b;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u4ee3\u7801\u5fc5\u987b\u653e\u5728\u5355\u4e2a\u4ee3\u7801\u5757\u5185&#xff0c;\u4e0d\u5f97\u5206\u6563&#xff1b;\u5982\u679c\u8868\u8ff0\u4e3a\u591a\u4e2a\u201c\u6587\u4ef6\u201d&#xff0c;\u8bf7\u7528\u6ce8\u91ca\u5206\u9694&#xff08;\u4f8b\u5982 \/\/ File: XXX.java&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5b8c\u6574\u5b9e\u73b0\u4ee3\u7801\u5e94\u5305\u542b\u8be6\u7ec6\u6ce8\u91ca&#xff08;\u4e2d\u6587\u6ce8\u91ca&#xff09;&#xff0c;\u89e3\u91ca\u6bcf\u4e00\u6b65\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u505a&#xff0c;\u4fbf\u4e8e\u8bfe\u5802\u6f14\u793a&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u63d0\u4f9b\u4e3b\u65b9\u6cd5\u793a\u4f8b&#xff0c;\u5c55\u793a&#xff1a;\u5bf9\u5b57\u7b26\u4e32 &#034;123456789&#034; \u7684\u8ba1\u7b97\u5e76\u8f93\u51fa\u5341\u516d\u8fdb\u5236\u7ed3\u679c&#xff0c;\u68c0\u9a8c\u5176\u662f\u5426\u7b49\u4e8e CBF43926&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u8f93\u51fa\u683c\u5f0f\u5316\u4e3a\u56fa\u5b9a 8 \u4f4d\u5927\u5199\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32&#xff08;\u4f8b\u5982 String.format(&#034;%08X&#034;, value)&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4ee3\u7801\u8be6\u7ec6\u89e3\u8bfb\u90e8\u5206\u53ea\u89e3\u91ca\u5404\u4e2a\u65b9\u6cd5\u7684\u4f5c\u7528&#xff0c;\u4e0d\u8981\u91cd\u590d\u4ee3\u7801&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6587\u6863\u5fc5\u987b\u8be6\u5c3d&#xff0c;\u9762\u5411\u6559\u5b66&#xff0c;\u5305\u542b\u80cc\u666f\u3001\u5b9e\u73b0\u601d\u8def\u3001\u5b8c\u6574\u4ee3\u7801\u3001\u89e3\u8bfb\u3001\u603b\u7ed3\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u6269\u5c55\u65b9\u5411&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6587\u7ae0\u4e2d\u6587\u4e0d\u5c11\u4e8e 5000 \u5b57&#xff08;\u5df2\u6309\u8be5\u8981\u6c42\u751f\u6210\u8be6\u5c3d\u8bf4\u660e\u4e0e\u6ce8\u91ca&#xff09;\u3002<\/p>\n<\/li>\n<h2>3. \u76f8\u5173\u6280\u672f\u8be6\u7ec6\u4ecb\u7ecd<\/h2>\n<ul>\n<li>\n<p>\u4f4d\u8fd0\u7b97\u4e0e\u591a\u9879\u5f0f\u89c6\u89d2&#xff1a;CRC \u7684\u672c\u8d28\u662f\u5bf9\u4e8c\u8fdb\u5236\u591a\u9879\u5f0f\u505a\u6a21\u4e8c\u9664\u6cd5&#xff08;GF(2) \u591a\u9879\u5f0f&#xff09;&#xff0c;\u4f46\u5728\u7a0b\u5e8f\u4e2d\u901a\u5e38\u901a\u8fc7\u4f4d\u79fb\u548c\u6309\u4f4d\u5f02\u6216\u5b9e\u73b0\u3002\u751f\u6210\u591a\u9879\u5f0f&#xff08;\u4f8b\u5982 CRC-32 \u7684 0x04C11DB7&#xff09;\u5b9a\u4e49\u4e86\u53cd\u9988\u9879\u3002<\/p>\n<\/li>\n<li>\n<p>\u53cd\u5c04&#xff08;reflection&#xff09;\/\u53cd\u8f6c&#xff08;bit-reflection&#xff09;&#xff1a;\u6709\u4e9b CRC \u6807\u51c6\u8981\u6c42\u5bf9\u8f93\u5165\u5b57\u8282\u5148\u6309\u4f4d\u53cd\u8f6c&#xff08;0bABCDEFGH \u2192 0bHGFEDCBA&#xff09;&#xff0c;\u5e76\u5728\u6700\u7ec8\u7ed3\u679c\u524d\u540e\u6267\u884c\u53cd\u5c04\u6216\u5f02\u6216\u64cd\u4f5c\u3002\u5e38\u89c1 CRC-32&#xff08;IEEE&#xff09;\u4f7f\u7528\u53cd\u5c04\u8f93\u5165\u4e0e\u53cd\u5c04\u8f93\u51fa\u3002<\/p>\n<\/li>\n<li>\n<p>\u67e5\u8868\u6cd5&#xff08;table-driven&#xff09;&#xff1a;\u9010\u4f4d\u8ba1\u7b97\u76f4\u89c2\u4f46\u6162&#xff0c;\u8868\u9a71\u52a8\u901a\u8fc7\u9884\u5148\u8ba1\u7b97 256 \u6761\u8868\u9879&#xff08;\u6bcf\u4e2a\u53ef\u80fd\u7684\u5b57\u8282\u503c\u7684\u53cd\u9988\u7ed3\u679c&#xff09;&#xff0c;\u6309\u5b57\u8282\u66f4\u65b0 CRC&#xff0c;\u5927\u5e45\u63d0\u901f\u3002\u8868\u53ef\u4ee5\u6839\u636e\u662f\u5426\u53cd\u5c04\u3001\u4f4d\u5bbd\u4e0d\u540c\u800c\u751f\u6210\u5bf9\u5e94\u7684\u8868\u9879\u3002<\/p>\n<\/li>\n<li>\n<p>\u7c7b\u578b\u4e0e\u65e0\u7b26\u53f7\u95ee\u9898&#xff1a;Java \u6ca1\u6709\u65e0\u7b26\u53f7\u6574\u578b&#xff0c;32 \u4f4d\u7684 CRC \u8981\u653e\u5728 long&#xff08;64 \u4f4d&#xff09;\u91cc\u5904\u7406\u6216\u4f7f\u7528 int \u5e76\u4e25\u683c\u63a9\u7801&#xff08;&amp; 0xFFFFFFFFL&#xff09;\u6765\u4fdd\u8bc1\u6309\u65e0\u7b26\u53f7\u8bed\u4e49\u6253\u5370\u4e0e\u6bd4\u8f83\u3002<\/p>\n<\/li>\n<li>\n<p>\u5b57\u7b26\u7f16\u7801&#xff1a;\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u6570\u7ec4\u65f6&#xff0c;\u7f16\u7801\u4f1a\u5f71\u54cd\u7ed3\u679c&#xff08;ASCII\u3001UTF-8 \u7b49&#xff09;\u3002\u6d4b\u8bd5\u5411\u91cf\u901a\u5e38\u6309 ASCII \u7f16\u7801\u3002\u793a\u4f8b\u4e2d\u660e\u786e\u4f7f\u7528 StandardCharsets.US_ASCII\u3002<\/p>\n<\/li>\n<li>\n<p>\u5185\u7f6e\u7c7b&#xff1a;java.util.zip.CRC32 \u662f JDK \u63d0\u4f9b\u7684\u9ad8\u6548\u5b9e\u73b0&#xff0c;\u5df2\u88ab\u4f18\u5316\u5e76\u5728\u591a\u6570\u5de5\u7a0b\u4e2d\u76f4\u63a5\u4f7f\u7528\u5373\u53ef\u3002<\/p>\n<\/li>\n<\/ul>\n<h2>4. \u5b9e\u73b0\u601d\u8def\u8be6\u7ec6\u4ecb\u7ecd<\/h2>\n<li>\n<p>\u603b\u4f53\u8bbe\u8ba1&#xff1a;\u7f16\u5199\u4e00\u4e2a\u5de5\u5177\u7c7b CRC32Util&#xff0c;\u63d0\u4f9b\u9759\u6001\u65b9\u6cd5&#xff1a;crc32WithBuiltin(byte[])\u3001crc32WithBuiltin(String, Charset)\u3001crc32TableDriven(byte[])\u3001crc32TableDriven(String, Charset)\u3001\u4ee5\u53ca toHex8(long) \u683c\u5f0f\u5316\u8f93\u51fa\u3002\u5e76\u7f16\u5199 Main \u6f14\u793a\u7c7b&#xff08;\u540c\u4e00\u4ee3\u7801\u5757\u4e2d\u7528\u6ce8\u91ca\u5206\u9694\u4e3a\u4e0d\u540c\u201c\u6587\u4ef6\u201d&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>table \u8868\u751f\u6210&#xff1a;\u751f\u6210 256 \u9879\u8868 CRC32_TABLE\u3002\u5bf9\u4e8e CRC-32&#xff08;\u53cd\u5c04\u591a\u9879\u5f0f 0xEDB88320&#xff0c;\u5373 0x04C11DB7 \u7684\u53cd\u5c04&#xff09;&#xff0c;\u8868\u9879\u751f\u6210\u65b9\u6cd5\u4e3a&#xff1a;\u5bf9\u6bcf\u4e2a\u53ef\u80fd\u7684\u5b57\u8282\u503c i&#xff0c;\u4ee4 r &#061; i&#xff0c;\u5faa\u73af 8 \u6b21&#xff1a;\u5982\u679c r &amp; 1 \u4e3a 1&#xff0c;\u5219 r &#061; (r &gt;&gt;&gt; 1) ^ poly&#xff0c;\u5426\u5219 r &gt;&gt;&gt;&#061; 1\u3002\u6700\u540e\u5bf9 32 \u4f4d\u63a9\u7801 0xFFFFFFFFL \u505a\u63a9\u7801\u3002<\/p>\n<\/li>\n<li>\n<p>table-driven \u8ba1\u7b97\u8fc7\u7a0b&#xff1a;\u521d\u59cb\u5316 crc &#061; 0xFFFFFFFFL&#xff1b;\u5bf9\u6570\u636e\u6bcf\u4e2a\u5b57\u8282 b&#xff1a;idx &#061; (crc ^ (b &amp; 0xFF)) &amp; 0xFF&#xff0c;crc &#061; (CRC32_TABLE[idx] ^ (crc &gt;&gt;&gt; 8)) &amp; 0xFFFFFFFFL\u3002\u5b8c\u6210\u540e crc ^&#061; 0xFFFFFFFFL\u3002<\/p>\n<\/li>\n<li>\n<p>\u5185\u7f6e\u5b9e\u73b0&#xff1a;java.util.zip.CRC32 \u7684\u4f7f\u7528\u975e\u5e38\u7b80\u5355&#xff0c;\u8c03\u7528 update&#xff0c;\u6700\u540e\u53d6\u5f97 getValue()&#xff08;\u8fd4\u56de long&#xff0c;\u65e0\u7b26\u53f7\u503c&#xff09;\u3002\u5bf9\u6bd4\u4e24\u8005\u8f93\u51fa\u786e\u4fdd\u4e00\u81f4\u3002<\/p>\n<\/li>\n<li>\n<p>\u683c\u5f0f\u5316\u4e0e\u9a8c\u8bc1&#xff1a;\u7ed3\u679c\u683c\u5f0f\u5316\u4e3a 8 \u4f4d\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32\u7528\u4e8e\u76f4\u89c2\u5c55\u793a\u5e76\u4e0e\u6807\u51c6\u6d4b\u8bd5\u5411\u91cf\u6bd4\u8f83\u3002\u4e3b\u51fd\u6570\u4ee5 &#034;123456789&#034; \u4e3a\u8f93\u5165\u8fdb\u884c\u6f14\u793a&#xff0c;\u671f\u671b CBF43926\u3002<\/p>\n<\/li>\n<li>\n<p>\u6559\u5b66\u8f93\u51fa&#xff1a;\u4e3b\u65b9\u6cd5\u540c\u65f6\u8f93\u51fa\u5185\u7f6e\u65b9\u6cd5\u4e0e table-driven \u65b9\u6cd5\u7684\u7ed3\u679c\u5e76\u6bd4\u8f83\u662f\u5426\u76f8\u7b49&#xff1b;\u8fd8\u7ed9\u51fa\u4efb\u610f\u5b57\u8282\u6570\u7ec4\u7684\u8ba1\u7b97\u793a\u4f8b\u3002<\/p>\n<\/li>\n<h2>5. \u5b8c\u6574\u5b9e\u73b0\u4ee3\u7801<\/h2>\n<p>\/\/ File: CRC32Util.java<br \/>\n\/\/ \u8bf4\u660e&#xff1a;\u5355\u6587\u4ef6\u5b9e\u73b0 CRC-32 \u7684\u4e24\u79cd\u65b9\u5f0f&#xff08;Java \u5185\u7f6e\u4e0e\u81ea\u5b9e\u73b0 table-driven&#xff09;&#xff0c;\u517c\u5bb9 Java 8&#043;\u3002<br \/>\n\/\/ \u4e0d\u540c\u201c\u6587\u4ef6\u201d\u4ee5\u6ce8\u91ca\u5206\u9694&#xff0c;\u4fbf\u4e8e\u590d\u5236\u5230\u591a\u4e2a\u6e90\u6587\u4ef6\u6216\u76f4\u63a5\u7528\u4e8e\u8bfe\u5802\u6f14\u793a\u3002<br \/>\n\/\/ \u6ce8\u610f&#xff1a;\u672c\u5b9e\u73b0\u4ee5 IEEE-802.3 \/ ISO-3309 \u7684\u53cd\u5c04 CRC-32 \u6807\u51c6\u4e3a\u4f8b&#xff1a;\u591a\u9879\u5f0f 0x04C11DB7&#xff08;\u53cd\u5c04\u5f62\u5f0f 0xEDB88320&#xff09;\u3002<\/p>\n<p>import java.nio.charset.Charset;<br \/>\nimport java.nio.charset.StandardCharsets;<br \/>\nimport java.util.zip.CRC32;<\/p>\n<p>\/**<br \/>\n * CRC32Util<br \/>\n * \u6559\u5b66\u4e0e\u5de5\u7a0b\u517c\u7528\u7684 CRC-32 \u5de5\u5177\u7c7b\u3002<br \/>\n * \u63d0\u4f9b&#xff1a;<br \/>\n *  &#8211; \u4f7f\u7528 Java \u6807\u51c6\u5e93 java.util.zip.CRC32 \u7684\u4fbf\u6377\u65b9\u6cd5&#xff08;\u63a8\u8350\u5de5\u7a0b\u4e2d\u4f7f\u7528&#xff09;<br \/>\n *  &#8211; \u81ea\u5b9e\u73b0\u7684 table-driven \u65b9\u6cd5&#xff08;\u6559\u5b66\u7528&#xff0c;\u5c55\u793a\u67e5\u8868\u539f\u7406&#xff09;<br \/>\n *<br \/>\n * \u8bf4\u660e&#xff1a;<br \/>\n *  &#8211; \u6240\u6709\u8fd4\u56de\u503c\u5747\u4e3a\u65e0\u7b26\u53f7 32 \u4f4d\u503c&#xff0c;\u4fdd\u5b58\u5728 long \u4e2d&#xff08;\u5e76\u5728\u8f93\u51fa\u6216\u6bd4\u8f83\u65f6\u4f7f\u7528\u63a9\u7801 0xFFFFFFFFL \u5904\u7406&#xff09;\u3002<br \/>\n *  &#8211; \u5bf9\u4e8e\u5b57\u7b26\u4e32\u8f93\u5165&#xff0c;\u5e94\u660e\u786e\u4f7f\u7528\u7684\u5b57\u7b26\u7f16\u7801&#xff08;\u793a\u4f8b\u4f7f\u7528 StandardCharsets.US_ASCII&#xff09;\u3002<br \/>\n *\/<br \/>\npublic class CRC32Util {<\/p>\n<p>    \/\/ &#8212;&#8212;&#8212;&#8212;&#8212;- \u5e38\u91cf\u5b9a\u4e49 &#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n    \/\/ CRC-32 \u53cd\u5c04\u591a\u9879\u5f0f&#xff08;0x04C11DB7 \u7684\u53cd\u5c04\u503c&#xff09;<br \/>\n    private static final long CRC32_POLY_REFLECTED &#061; 0xEDB88320L;<br \/>\n    \/\/ 32 \u4f4d\u63a9\u7801&#xff0c;\u4fdd\u8bc1\u7ed3\u679c\u5728 0..0xFFFFFFFF \u5185<br \/>\n    private static final long CRC32_MASK &#061; 0xFFFFFFFFL;<\/p>\n<p>    \/\/ \u9884\u8ba1\u7b97\u67e5\u8868&#xff08;256 \u9879&#xff09;&#xff0c;\u9759\u6001\u521d\u59cb\u5316\u4e00\u6b21\u5373\u53ef\u590d\u7528<br \/>\n    private static final long[] CRC32_TABLE &#061; makeCrc32Table();<\/p>\n<p>    \/\/ &#8212;&#8212;&#8212;&#8212;&#8212;- \u8868\u751f\u6210&#xff08;\u9759\u6001\u65b9\u6cd5&#xff09; &#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n    \/**<br \/>\n     * makeCrc32Table<br \/>\n     * \u751f\u6210 256 \u9879\u7684 CRC32 \u67e5\u627e\u8868&#xff08;\u53cd\u5c04\u5f62\u5f0f&#xff09;\u3002<br \/>\n     * \u6559\u5b66\u8981\u70b9&#xff1a;<br \/>\n     *  &#8211; \u5bf9\u4e8e\u8868\u9a71\u52a8\u7b97\u6cd5&#xff0c;\u6211\u4eec\u9884\u5148\u8ba1\u7b97\u6bcf\u4e2a\u53ef\u80fd\u5b57\u8282&#xff08;0..255&#xff09;\u4f5c\u4e3a\u9996\u5b57\u8282\u8f93\u5165\u65f6&#xff0c;<br \/>\n     *    \u7ecf\u8fc7 8 \u6b21\u79fb\u4f4d\/\u53cd\u9988\u540e\u5bf9 CRC \u5bc4\u5b58\u5668\u5f71\u54cd\u7684\u503c\u3002\u8868\u9879\u53ef\u4ee5\u88ab\u591a\u6b21\u590d\u7528&#xff0c;\u4ece\u800c\u4f7f<br \/>\n     *    \u5b9e\u9645\u8ba1\u7b97\u65f6\u6309\u5b57\u8282\u66f4\u65b0 CRC&#xff0c;\u800c\u4e0d\u662f\u6309\u4f4d\u66f4\u65b0&#xff0c;\u4ece\u800c\u83b7\u5f97 8 \u500d\u7684\u52a0\u901f\u3002<br \/>\n     *<br \/>\n     * &#064;return 256 \u957f\u5ea6\u7684\u67e5\u627e\u8868&#xff08;\u6bcf\u9879\u4e3a\u65e0\u7b26\u53f7 32 \u4f4d\u503c&#xff0c;\u4fdd\u5b58\u5728 long&#xff09;<br \/>\n     *\/<br \/>\n    private static long[] makeCrc32Table() {<br \/>\n        long[] table &#061; new long[256];<br \/>\n        for (int i &#061; 0; i &lt; 256; i&#043;&#043;) {<br \/>\n            long r &#061; i;<br \/>\n            \/\/ \u5bf9\u6bcf\u4e00\u4e2a\u5b57\u8282\u6267\u884c 8 \u6b21\u5904\u7406&#xff08;\u5bf9\u5e94 8 \u4f4d&#xff09;<br \/>\n            for (int j &#061; 0; j &lt; 8; j&#043;&#043;) {<br \/>\n                if ((r &amp; 1L) !&#061; 0) {<br \/>\n                    \/\/ \u5982\u679c\u6700\u4f4e\u4f4d\u4e3a 1&#xff0c;\u53f3\u79fb\u5e76\u4e0e\u591a\u9879\u5f0f\u5f02\u6216&#xff08;\u53cd\u9988&#xff09;<br \/>\n                    r &#061; (r &gt;&gt;&gt; 1) ^ CRC32_POLY_REFLECTED;<br \/>\n                } else {<br \/>\n                    \/\/ \u5426\u5219\u4ec5\u53f3\u79fb<br \/>\n                    r &#061; (r &gt;&gt;&gt; 1);<br \/>\n                }<br \/>\n            }<br \/>\n            \/\/ \u63a9\u7801\u4ee5\u4fdd\u8bc1\u4e3a 32 \u4f4d\u65e0\u7b26\u53f7\u6570<br \/>\n            table[i] &#061; r &amp; CRC32_MASK;<br \/>\n        }<br \/>\n        return table;<br \/>\n    }<\/p>\n<p>    \/\/ &#8212;&#8212;&#8212;&#8212;&#8212;- \u5185\u7f6e\u5b9e\u73b0&#xff08;\u63a8\u8350&#xff09; &#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n    \/**<br \/>\n     * crc32WithBuiltin<br \/>\n     * \u4f7f\u7528 JDK \u5185\u7f6e\u7c7b java.util.zip.CRC32 \u8ba1\u7b97 byte[] \u7684 CRC-32 \u503c\u3002<br \/>\n     * \u8be5\u65b9\u6cd5\u9002\u7528\u4e8e\u5de5\u7a0b\u573a\u666f&#xff0c;\u7b80\u6d01\u4e14\u6027\u80fd\u826f\u597d&#xff08;JDK \u5b9e\u73b0\u901a\u5e38\u7ecf\u8fc7\u9ad8\u5ea6\u4f18\u5316&#xff09;\u3002<br \/>\n     *<br \/>\n     * &#064;param data \u5f85\u6821\u9a8c\u7684\u5b57\u8282\u6570\u7ec4<br \/>\n     * &#064;return \u65e0\u7b26\u53f7 32 \u4f4d CRC \u503c&#xff08;\u5b58\u653e\u5728 long \u4e2d&#xff09;<br \/>\n     *\/<br \/>\n    public static long crc32WithBuiltin(byte[] data) {<br \/>\n        CRC32 crc &#061; new CRC32();<br \/>\n        crc.update(data, 0, data.length);<br \/>\n        \/\/ getValue \u8fd4\u56de long&#xff0c;\u4fdd\u8bc1\u4e3a\u65e0\u7b26\u53f7\u503c\u65f6\u4e5f\u8981\u4e0e\u63a9\u7801\u76f8\u4e0e<br \/>\n        return crc.getValue() &amp; CRC32_MASK;<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * crc32WithBuiltin<br \/>\n     * \u5bf9\u5b57\u7b26\u4e32\u6309\u6307\u5b9a\u7f16\u7801\u8ba1\u7b97 CRC-32\u3002<br \/>\n     *<br \/>\n     * &#064;param text \u5f85\u6821\u9a8c\u5b57\u7b26\u4e32<br \/>\n     * &#064;param charset \u5b57\u7b26\u7f16\u7801&#xff08;\u4f8b\u5982 StandardCharsets.US_ASCII&#xff09;<br \/>\n     * &#064;return \u65e0\u7b26\u53f7 32 \u4f4d CRC \u503c&#xff08;long&#xff09;<br \/>\n     *\/<br \/>\n    public static long crc32WithBuiltin(String text, Charset charset) {<br \/>\n        if (text &#061;&#061; null) return 0L;<br \/>\n        return crc32WithBuiltin(text.getBytes(charset));<br \/>\n    }<\/p>\n<p>    \/\/ &#8212;&#8212;&#8212;&#8212;&#8212;- \u81ea\u5b9e\u73b0&#xff1a;table-driven &#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n    \/**<br \/>\n     * crc32TableDriven<br \/>\n     * \u4f7f\u7528 table-driven&#xff08;\u67e5\u8868&#xff09;\u7b97\u6cd5\u8ba1\u7b97 CRC-32&#xff08;\u53cd\u5c04\/\u53f3\u79fb\u65b9\u5f0f&#xff09;\u3002<br \/>\n     * \u7b97\u6cd5\u6b65\u9aa4&#xff08;\u7b80\u8ff0&#xff09;&#xff1a;<br \/>\n     *  1. \u521d\u59cb\u5316 crc &#061; 0xFFFFFFFF<br \/>\n     *  2. \u904d\u5386\u6570\u636e byte b&#xff1a;idx &#061; (crc ^ (b &amp; 0xFF)) &amp; 0xFF; crc &#061; (table[idx] ^ (crc &gt;&gt;&gt; 8)) &amp; 0xFFFFFFFF<br \/>\n     *  3. \u6700\u540e crc &#061; crc ^ 0xFFFFFFFF<br \/>\n     *<br \/>\n     * \u8be5\u7b97\u6cd5\u4e0e JDK \u5185\u7f6e\u5b9e\u73b0\u7684\u53c2\u6570\u5177\u6709\u76f8\u540c\u8bed\u4e49&#xff08;\u5e38\u89c1\u7684 IEEE-802.3 \u6807\u51c6&#xff09;&#xff0c;<br \/>\n     * \u5bf9\u5b57\u7b26\u4e32\/\u5b57\u8282\u6570\u7ec4\u5747\u9002\u7528\u3002<br \/>\n     *<br \/>\n     * &#064;param data \u5f85\u6821\u9a8c\u5b57\u8282\u6570\u7ec4<br \/>\n     * &#064;return \u65e0\u7b26\u53f7 32 \u4f4d CRC \u503c&#xff08;long&#xff09;<br \/>\n     *\/<br \/>\n    public static long crc32TableDriven(byte[] data) {<br \/>\n        if (data &#061;&#061; null) return 0L;<br \/>\n        long crc &#061; 0xFFFFFFFFL; \/\/ \u521d\u59cb\u503c<br \/>\n        for (byte b : data) {<br \/>\n            int idx &#061; (int) ((crc ^ (b &amp; 0xFF)) &amp; 0xFF);<br \/>\n            crc &#061; (CRC32_TABLE[idx] ^ (crc &gt;&gt;&gt; 8)) &amp; CRC32_MASK;<br \/>\n        }<br \/>\n        \/\/ \u6700\u7ec8\u53d6\u53cd<br \/>\n        crc &#061; (crc ^ 0xFFFFFFFFL) &amp; CRC32_MASK;<br \/>\n        return crc;<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * crc32TableDriven (String \u7248\u672c)<br \/>\n     * \u5bf9\u5b57\u7b26\u4e32\u6309\u6307\u5b9a\u5b57\u7b26\u7f16\u7801\u8ba1\u7b97 CRC-32&#xff08;table-driven&#xff09;\u3002<br \/>\n     *<br \/>\n     * &#064;param text \u5f85\u6821\u9a8c\u5b57\u7b26\u4e32<br \/>\n     * &#064;param charset \u5b57\u7b26\u7f16\u7801&#xff08;\u4f8b\u5982 StandardCharsets.US_ASCII&#xff09;<br \/>\n     * &#064;return \u65e0\u7b26\u53f7 32 \u4f4d CRC \u503c&#xff08;long&#xff09;<br \/>\n     *\/<br \/>\n    public static long crc32TableDriven(String text, Charset charset) {<br \/>\n        if (text &#061;&#061; null) return 0L;<br \/>\n        return crc32TableDriven(text.getBytes(charset));<br \/>\n    }<\/p>\n<p>    \/\/ &#8212;&#8212;&#8212;&#8212;&#8212;- \u8f93\u51fa\u683c\u5f0f\u5316\u8f85\u52a9 &#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n    \/**<br \/>\n     * toHex8<br \/>\n     * \u5c06\u65e0\u7b26\u53f7 32 \u4f4d CRC \u503c\u683c\u5f0f\u5316\u4e3a\u56fa\u5b9a 8 \u4f4d\u5927\u5199\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32&#xff0c;\u4fbf\u4e8e\u5bf9\u6bd4\u6d4b\u8bd5\u5411\u91cf\u3002<br \/>\n     *<br \/>\n     * &#064;param crc32Value \u65e0\u7b26\u53f7 32 \u4f4d CRC \u503c&#xff08;\u5b58\u653e\u5728 long \u4e2d&#xff09;<br \/>\n     * &#064;return 8 \u4f4d\u5927\u5199\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32&#xff08;\u4f8b\u5982 &#034;CBF43926&#034;&#xff09;<br \/>\n     *\/<br \/>\n    public static String toHex8(long crc32Value) {<br \/>\n        return String.format(&#034;%08X&#034;, crc32Value &amp; CRC32_MASK);<br \/>\n    }<br \/>\n}<\/p>\n<p>\/\/ File: Main.java<br \/>\n\/\/ \u6f14\u793a\u4e0e\u6d4b\u8bd5&#xff1a;\u4f7f\u7528 &#034;123456789&#034; \u4f5c\u4e3a\u6d4b\u8bd5\u5411\u91cf&#xff08;\u5176 CRC-32 \u671f\u671b\u503c\u4e3a 0xCBF43926&#xff09;<br \/>\n\/\/ \u8be5\u7c7b\u7528\u4e8e\u8bfe\u5802\u6f14\u793a\u4e0e\u9a8c\u8bc1\u5b9e\u73b0\u6b63\u786e\u6027\u3002<\/p>\n<p>import java.nio.charset.StandardCharsets;<\/p>\n<p>public class Main {<\/p>\n<p>    public static void main(String[] args) {<br \/>\n        String test &#061; &#034;123456789&#034;; \/\/ \u7ecf\u5178 CRC \u6d4b\u8bd5\u5411\u91cf&#xff08;ASCII \u7f16\u7801&#xff09;<br \/>\n        System.out.println(&#034;\u6d4b\u8bd5\u5411\u91cf: \\\\&#034;&#034; &#043; test &#043; &#034;\\\\&#034; (ASCII)&#034;);<\/p>\n<p>        \/\/ \u4f7f\u7528 JDK \u5185\u7f6e\u5b9e\u73b0<br \/>\n        long builtin &#061; CRC32Util.crc32WithBuiltin(test, StandardCharsets.US_ASCII);<br \/>\n        System.out.println(&#034;JDK \u5185\u7f6e CRC32 &#061; 0x&#034; &#043; CRC32Util.toHex8(builtin) &#043; &#034;  (\u671f\u671b: CBF43926)&#034;);<\/p>\n<p>        \/\/ \u4f7f\u7528\u81ea\u5b9e\u73b0 table-driven<br \/>\n        long table &#061; CRC32Util.crc32TableDriven(test, StandardCharsets.US_ASCII);<br \/>\n        System.out.println(&#034;\u81ea\u5b9e\u73b0 table-driven CRC32 &#061; 0x&#034; &#043; CRC32Util.toHex8(table) &#043; &#034;  (\u671f\u671b: CBF43926)&#034;);<\/p>\n<p>        \/\/ \u6bd4\u8f83\u4e24\u8005\u662f\u5426\u4e00\u81f4<br \/>\n        System.out.println(&#034;\u4e24\u8005\u4e00\u81f4\u5417&#xff1f; &#034; &#043; (builtin &#061;&#061; table));<\/p>\n<p>        \/\/ \u793a\u4f8b&#xff1a;\u5bf9\u4efb\u610f\u5b57\u8282\u6570\u7ec4\u8ba1\u7b97 CRC32<br \/>\n        byte[] bytes &#061; new byte[] {0x01, 0x02, 0x03, 0x04};<br \/>\n        long sample &#061; CRC32Util.crc32TableDriven(bytes);<br \/>\n        System.out.println(&#034;\u5b57\u8282\u6570\u7ec4 {01,02,03,04} \u7684 CRC32 &#061; 0x&#034; &#043; CRC32Util.toHex8(sample));<br \/>\n    }<br \/>\n}<\/p>\n<h2>6. \u4ee3\u7801\u8be6\u7ec6\u89e3\u8bfb<\/h2>\n<p>&#xff08;\u6ce8&#xff1a;\u4e0b\u5217\u8bf4\u660e\u53ea\u63cf\u8ff0\u6bcf\u4e2a\u65b9\u6cd5\/\u51fd\u6570\u7684\u76ee\u7684\u4e0e\u4e3b\u8981\u884c\u4e3a&#xff0c;\u4e0d\u91cd\u590d\u4ee3\u7801\u5b9e\u73b0\u7ec6\u8282\u3002&#xff09;<\/p>\n<li>\n<p>makeCrc32Table()&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u76ee\u7684&#xff1a;\u5728\u7c7b\u52a0\u8f7d\u65f6\u751f\u6210 256 \u6761\u67e5\u627e\u8868\u9879&#xff08;CRC32_TABLE&#xff09;&#xff0c;\u7528\u4e8e table-driven CRC \u66f4\u65b0\u3002\u8be5\u8868\u628a\u201c\u4e00\u4e2a\u5b57\u8282\u8f93\u5165\u5bfc\u81f4\u7684 8 \u6b21\u4f4d\u79fb\/\u53cd\u9988\u7ed3\u679c\u201d\u9884\u5148\u8ba1\u7b97\u597d&#xff0c;\u4ece\u800c\u4f7f\u540e\u7eed\u6309\u5b57\u8282\u66f4\u65b0\u6210\u4e3a\u53ef\u80fd\u5e76\u52a0\u901f\u8ba1\u7b97\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>crc32WithBuiltin(byte[] data)&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u76ee\u7684&#xff1a;\u4f7f\u7528 JDK \u81ea\u5e26\u7684 java.util.zip.CRC32 \u7c7b\u8ba1\u7b97\u7ed9\u5b9a\u5b57\u8282\u6570\u7ec4\u7684 CRC-32&#xff0c;\u5e76\u8fd4\u56de\u65e0\u7b26\u53f7 32 \u4f4d\u503c&#xff08;\u4ee5 long \u8868\u793a&#xff09;\u3002\u9002\u7528\u4e8e\u5de5\u7a0b\u73af\u5883&#xff0c;\u4ee3\u7801\u7b80\u6d01\u3001\u6027\u80fd\u597d\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>crc32WithBuiltin(String text, Charset charset)&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u76ee\u7684&#xff1a;\u5bf9\u5b57\u7b26\u4e32\u6309\u6307\u5b9a\u5b57\u7b26\u7f16\u7801\u5148\u8f6c\u4e3a\u5b57\u8282\u6570\u7ec4&#xff0c;\u7136\u540e\u8c03\u7528\u5185\u7f6e CRC \u8ba1\u7b97\u65b9\u6cd5&#xff08;\u4fbf\u6377\u5305\u88c5&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>crc32TableDriven(byte[] data)&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u76ee\u7684&#xff1a;\u4f7f\u7528\u81ea\u5b9e\u73b0\u7684 table-driven \u7b97\u6cd5\u6309\u5b57\u8282\u5feb\u901f\u8ba1\u7b97 CRC-32\u3002\u65b9\u6cd5\u5185\u90e8\u4f7f\u7528\u9884\u5148\u751f\u6210\u7684 CRC32_TABLE&#xff0c;\u5bf9\u6bcf\u4e2a\u5b57\u8282\u901a\u8fc7\u67e5\u8868\u548c\u79fb\u4f4d\u66f4\u65b0 CRC&#xff0c;\u6700\u540e\u505a\u5fc5\u8981\u7684\u53d6\u53cd\u4e0e\u63a9\u7801\u5904\u7406&#xff0c;\u8fd4\u56de\u6700\u7ec8\u65e0\u7b26\u53f7 32 \u4f4d CRC \u503c\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>crc32TableDriven(String text, Charset charset)&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u76ee\u7684&#xff1a;\u5bf9\u5b57\u7b26\u4e32\u6309\u6307\u5b9a\u7f16\u7801\u8f6c\u5b57\u8282\u540e\u8c03\u7528 table-driven \u8ba1\u7b97\u65b9\u6cd5&#xff0c;\u63d0\u4f9b\u5bf9\u5b57\u7b26\u4e32\u8f93\u5165\u7684\u4fbf\u6377\u652f\u6301\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>toHex8(long crc32Value)&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u76ee\u7684&#xff1a;\u628a\u65e0\u7b26\u53f7 32 \u4f4d CRC \u503c\u683c\u5f0f\u5316\u4e3a\u56fa\u5b9a 8 \u4f4d\u5927\u5199\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32&#xff08;\u7528\u4e8e\u76f4\u89c2\u5c55\u793a\u548c\u4e0e\u6d4b\u8bd5\u5411\u91cf\u5bf9\u6bd4&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Main.main(String[] args)&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u76ee\u7684&#xff1a;\u6f14\u793a\u4e0e\u9a8c\u8bc1&#xff1a;\u4ee5\u7ecf\u5178\u6d4b\u8bd5\u5411\u91cf &#034;123456789&#034; \u5206\u522b\u8c03\u7528\u5185\u7f6e\u4e0e\u81ea\u5b9e\u73b0\u65b9\u6cd5&#xff0c;\u8f93\u51fa\u5341\u516d\u8fdb\u5236\u7ed3\u679c\u5e76\u4e0e\u671f\u671b\u7ed3\u679c CBF43926 \u6bd4\u8f83&#xff1b;\u540c\u65f6\u5c55\u793a\u5bf9\u4efb\u610f\u5b57\u8282\u6570\u7ec4\u8ba1\u7b97\u7684\u793a\u4f8b\u3002\u8be5\u65b9\u6cd5\u4fbf\u4e8e\u8bfe\u5802\u6f14\u793a\u6216\u5728\u7ec8\u7aef\u76f4\u63a5\u8fd0\u884c\u9a8c\u8bc1\u7ed3\u679c\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<h2>7. \u9879\u76ee\u8be6\u7ec6\u603b\u7ed3<\/h2>\n<p>\u672c\u6587\u5b9e\u73b0\u5e76\u8bb2\u89e3\u4e86\u5982\u4f55\u7528 Java \u5bf9\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 CRC-32 \u6821\u9a8c\u548c&#xff0c;\u6ee1\u8db3\u6559\u5b66\u4e0e\u5de5\u7a0b\u4e24\u7c7b\u9700\u6c42&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u6559\u5b66\u5c42\u9762&#xff1a;\u901a\u8fc7\u81ea\u5b9e\u73b0\u7684 table-driven \u65b9\u6cd5\u4e0e\u6e05\u6670\u6ce8\u91ca&#xff0c;\u80fd\u591f\u8ba9\u5b66\u751f\u7406\u89e3 CRC \u7684\u67e5\u8868\u539f\u7406\u3001\u4e3a\u4ec0\u4e48\u8981\u9884\u751f\u6210\u8868\u3001\u5982\u4f55\u6309\u5b57\u8282\u66f4\u65b0\u5bc4\u5b58\u5668&#xff0c;\u4ee5\u53ca\u53cd\u5c04\/\u53d6\u53cd\u64cd\u4f5c\u7684\u7531\u6765\u3002<\/p>\n<\/li>\n<li>\n<p>\u5de5\u7a0b\u5c42\u9762&#xff1a;\u7ed9\u51fa\u4f7f\u7528 JDK \u5185\u7f6e CRC32 \u7684\u7b80\u6d01\u8c03\u7528\u65b9\u5f0f&#xff0c;\u4fbf\u4e8e\u5728\u751f\u4ea7\u4ee3\u7801\u4e2d\u76f4\u63a5\u4f7f\u7528&#xff0c;\u4fdd\u8bc1\u6027\u80fd\u4e0e\u53ef\u9760\u6027\u3002<\/p>\n<\/li>\n<li>\n<p>\u9a8c\u8bc1&#xff1a;\u4ee5\u7ecf\u5178\u6d4b\u8bd5\u5411\u91cf &#034;123456789&#034; \u9a8c\u8bc1\u4e24\u79cd\u5b9e\u73b0\u7684\u4e00\u81f4\u6027\u4e0e\u6b63\u786e\u6027&#xff08;\u671f\u671b\u503c 0xCBF43926&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u517c\u5bb9\u6027&#xff1a;\u6240\u6709\u793a\u4f8b\u5747\u517c\u5bb9 Java 8&#xff0c;\u907f\u514d\u4f7f\u7528 Java 9&#043; \u7684\u65b0 API&#xff0c;\u4fbf\u4e8e\u6559\u5b66\u73af\u5883\u666e\u904d\u9002\u7528\u3002<\/p>\n<\/li>\n<\/ul>\n<h2>8. \u9879\u76ee\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u7b54<\/h2>\n<p>Q1&#xff1a;\u4e3a\u4ec0\u4e48\u81ea\u5b9e\u73b0\u4e0e JDK \u5185\u7f6e\u7ed3\u679c\u5fc5\u987b\u4e00\u81f4&#xff1f;<br \/>\nA1&#xff1a;\u56e0\u4e3a\u4e24\u8005\u4f7f\u7528\u76f8\u540c\u7684 CRC \u53c2\u6570&#xff08;\u53cd\u5c04\u591a\u9879\u5f0f\u3001\u521d\u59cb\u503c\u3001\u6309\u5b57\u8282\u53cd\u5c04\u5904\u7406\u3001\u6700\u540e\u5f02\u6216 0xFFFFFFFF&#xff09;&#xff0c;\u5728\u53c2\u6570\u4e00\u81f4\u65f6&#xff0c;\u6b63\u786e\u5b9e\u73b0\u7684 table-driven \u4e0e\u9010\u4f4d\/\u5185\u7f6e\u65b9\u6cd5\u8f93\u51fa\u5e94\u5b8c\u5168\u76f8\u540c\u3002\u793a\u4f8b\u4e2d\u7528\u6d4b\u8bd5\u5411\u91cf\u68c0\u9a8c\u8fd9\u4e00\u70b9\u3002<\/p>\n<p>Q2&#xff1a;\u5b57\u7b26\u4e32\u7f16\u7801\u4f1a\u4e0d\u4f1a\u5f71\u54cd CRC \u503c&#xff1f;<br \/>\nA2&#xff1a;\u4f1a\u3002\u5b57\u7b26\u4e32\u8f6c\u6362\u6210\u5b57\u8282\u5e8f\u5217\u65f6\u9009\u62e9\u7684\u7f16\u7801&#xff08;ASCII\u3001UTF-8\u3001UTF-16 \u7b49&#xff09;\u4f1a\u76f4\u63a5\u6539\u53d8\u5b57\u8282\u6570\u7ec4&#xff0c;\u4ece\u800c\u5f71\u54cd CRC \u503c\u3002\u4e3a\u6d4b\u8bd5\u4e00\u81f4\u6027&#xff0c;\u793a\u4f8b\u4f7f\u7528 ASCII \u7f16\u7801\u3002\u751f\u4ea7\u73af\u5883\u4e2d\u8bf7\u660e\u786e\u7f16\u7801\u5e76\u4fdd\u6301\u4e00\u81f4\u3002<\/p>\n<p>Q3&#xff1a;\u4e3a\u4ec0\u4e48\u8981\u5bf9\u7ed3\u679c\u505a &amp; 0xFFFFFFFFL&#xff1f;<br \/>\nA3&#xff1a;Java \u6ca1\u6709\u65e0\u7b26\u53f7 32 \u4f4d\u7c7b\u578b\u3002\u4f7f\u7528 long \u4fdd\u5b58 CRC \u503c\u5e76\u5bf9\u5176\u8fdb\u884c\u63a9\u7801\u80fd\u4fdd\u8bc1\u6309\u65e0\u7b26\u53f7\u8bed\u4e49\u5904\u7406\u4e0e\u683c\u5f0f\u5316\u8f93\u51fa&#xff0c;\u907f\u514d\u7b26\u53f7\u6269\u5c55\u5bfc\u81f4\u7684\u8d1f\u6570\u8868\u73b0\u3002<\/p>\n<p>Q4&#xff1a;table-driven \u6bd4 bit-by-bit \u5feb\u591a\u5c11&#xff1f;<br \/>\nA4&#xff1a;\u7406\u8bba\u4e0a\u7ea6\u5feb 8 \u500d&#xff08;\u56e0\u4e3a\u6bcf\u6b21\u5faa\u73af\u5904\u7406\u4e00\u4e2a\u5b57\u8282\u800c\u4e0d\u662f\u4e00\u4f4d&#xff09;&#xff0c;\u5728\u5b9e\u9645 CPU \u4e0e JVM \u4f18\u5316\u4e0b\u901a\u5e38\u80fd\u8fbe\u5230\u663e\u8457\u52a0\u901f\u3002\u66f4\u9ad8\u9636\u4f18\u5316&#xff08;slice-by-4\u3001slice-by-8&#xff09;\u53ef\u8fdb\u4e00\u6b65\u63d0\u5347\u541e\u5410\u91cf&#xff0c;\u4f46\u4f1a\u5360\u7528\u66f4\u591a\u5185\u5b58&#xff08;\u66f4\u591a\u8868&#xff09;\u3002<\/p>\n<p>Q5&#xff1a;\u662f\u5426\u652f\u6301\u6d41\u5f0f\u5927\u6587\u4ef6 CRC \u8ba1\u7b97&#xff1f;<br \/>\nA5&#xff1a;\u793a\u4f8b\u65b9\u6cd5\u5bf9\u5b57\u8282\u6570\u7ec4\u8fdb\u884c\u8ba1\u7b97\u3002\u5bf9\u4e8e\u5927\u6587\u4ef6\u53ef\u9010\u5757\u8bfb\u53d6&#xff08;\u4f8b\u5982 4KB\u300164KB&#xff09;\u5e76\u5728\u7d2f\u79ef CRC \u65f6\u7ee7\u7eed\u4f7f\u7528 table-driven \u66f4\u65b0\u7b97\u6cd5&#xff08;\u5bf9\u6d41\u7684\u8fde\u7eed\u5757\u65e0\u9700\u91cd\u7f6e\u521d\u59cb\u503c&#xff09;\u3002JDK \u7684 CRC32 \u652f\u6301\u591a\u6b21 update&#xff0c;\u8fd9\u662f\u5904\u7406\u5927\u6587\u4ef6\u65f6\u7684\u63a8\u8350\u65b9\u5f0f\u3002<\/p>\n<h2>9. \u6269\u5c55\u65b9\u5411\u4e0e\u6027\u80fd\u4f18\u5316<\/h2>\n<li>\n<p>Slice-by-N \u4f18\u5316&#xff1a;\u91c7\u7528 slice-by-4 \u6216 slice-by-8 \u6280\u672f&#xff0c;\u751f\u6210\u591a\u5f20\u66f4\u5927\u7684\u8868&#xff0c;\u6bcf\u6b21\u5904\u7406\u591a\u4e2a\u5b57\u8282\u4ee5\u964d\u4f4e\u5faa\u73af\u4e0e\u7d22\u5f15\u5f00\u9500&#xff0c;\u9002\u7528\u4e8e\u5bf9\u541e\u5410\u91cf\u8981\u6c42\u6781\u9ad8\u7684\u573a\u666f&#xff08;\u7f51\u7edc\u5305\u5904\u7406\u3001\u6587\u4ef6\u6821\u9a8c&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>JNI \/ \u672c\u5730\u9ad8\u901f\u5b9e\u73b0&#xff1a;\u5bf9\u4e8e\u6781\u7aef\u6027\u80fd\u573a\u666f\u53ef\u7528 C\/C&#043;&#043; \u5b9e\u73b0\u5e76\u901a\u8fc7 JNI \u8c03\u7528&#xff0c;\u6216\u76f4\u63a5\u4f7f\u7528\u786c\u4ef6\u52a0\u901f\u6307\u4ee4&#xff08;\u5982 Intel CRC \u6307\u4ee4\u96c6&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5e76\u884c\u4e0e\u5206\u5757\u5408\u5e76&#xff1a;\u5c06\u5927\u6587\u4ef6\u5206\u5757\u5e76\u884c\u8ba1\u7b97\u5404\u5757 CRC&#xff0c;\u7136\u540e\u6309\u7279\u5b9a\u7b97\u6cd5\u5408\u5e76\u90e8\u5206 CRC&#xff08;\u6ce8\u610f&#xff1a;\u5408\u5e76\u4e0d\u662f\u76f4\u63a5\u5f02\u6216&#xff0c;\u9700\u8981\u7528\u5230 CRC \u7684\u6570\u5b66\u6027\u8d28&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u652f\u6301 CRC-64&#xff1a;\u6269\u5c55\u5230 64 \u4f4d\u5bbd\u5ea6&#xff08;\u6ce8\u610f Java \u7684\u65e0\u7b26\u53f7\u9650\u5236\u4e0e\u4f4d\u8fd0\u7b97\u8fb9\u754c&#xff09;&#xff0c;\u53ef\u4f7f\u7528 long \u4e14\u5c0f\u5fc3\u5904\u7406\u7b26\u53f7\u4f4d&#xff0c;\u6216\u4f7f\u7528 BigInteger \u5b9e\u73b0\u66f4\u901a\u7528\u4f46\u66f4\u6162\u7684\u65b9\u6848\u3002<\/p>\n<\/li>\n<li>\n<p>\u9519\u8bef\u6ce8\u5165\u4e0e\u6d4b\u8bd5\u5957\u4ef6&#xff1a;\u7f16\u5199\u5355\u5143\u6d4b\u8bd5\u4e0e\u9519\u8bef\u6ce8\u5165\u5de5\u5177&#xff0c;\u9a8c\u8bc1 CRC \u5728\u5355\u6bd4\u7279\u3001\u53cc\u6bd4\u7279\u3001\u4ee5\u53ca\u7a81\u53d1\u9519\u8bef\u4e0b\u7684\u68c0\u6d4b\u80fd\u529b&#xff0c;\u4fbf\u4e8e\u8bfe\u5802\u4e0a\u5c55\u793a CRC \u7684\u5b9e\u9645\u6548\u7528\u3002<\/p>\n<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.0k\u6b21\uff0c\u70b9\u8d5e43\u6b21\uff0c\u6536\u85cf11\u6b21\u3002JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09<\/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":[99,5373,81,427],"topic":[],"class_list":{"0":"post-53216","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-server","7":"tag-java","9":"tag-python","10":"tag-427"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09 - \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\/53216.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.0k\u6b21\uff0c\u70b9\u8d5e43\u6b21\uff0c\u6536\u85cf11\u6b21\u3002JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/53216.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-11T23:04:25+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=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/53216.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/53216.html\",\"name\":\"JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-11T23:04:25+00:00\",\"dateModified\":\"2025-08-11T23:04:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/53216.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/53216.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/53216.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09\"}]},{\"@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":"JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09 - \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\/53216.html","og_locale":"zh_CN","og_type":"article","og_title":"JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.0k\u6b21\uff0c\u70b9\u8d5e43\u6b21\uff0c\u6536\u85cf11\u6b21\u3002JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09","og_url":"https:\/\/www.wsisp.com\/helps\/53216.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-11T23:04:25+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/53216.html","url":"https:\/\/www.wsisp.com\/helps\/53216.html","name":"JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-11T23:04:25+00:00","dateModified":"2025-08-11T23:04:25+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/53216.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/53216.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/53216.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"JAVA:\u5b9e\u73b0\u5b57\u7b26\u4e32\u6216\u5b57\u8282\u6570\u7ec4\u751f\u6210 crc32 \u6821\u9a8c\u548c\u7b97\u6cd5\uff08\u9644\u5e26\u6e90\u7801\uff09"}]},{"@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\/53216","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=53216"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/53216\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=53216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=53216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=53216"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=53216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}