二维码RS数据纠错算法C版

上传人:feng****heng 文档编号:220209113 上传时间:2023-06-29 格式:DOCX 页数:19 大小:31.27KB
收藏 版权申诉 举报 下载
二维码RS数据纠错算法C版_第1页
第1页 / 共19页
二维码RS数据纠错算法C版_第2页
第2页 / 共19页
二维码RS数据纠错算法C版_第3页
第3页 / 共19页
资源描述:

《二维码RS数据纠错算法C版》由会员分享,可在线阅读,更多相关《二维码RS数据纠错算法C版(19页珍藏版)》请在装配图网上搜索。

1、二维码RS数据纠错算法C+版/二维码RS数据纠错算法,C+版本,2016年11月最新调试/二维码解析软件很多,但RS数据纠错生成算法,网上C+版本的很少,共享出来,供 大家下载!/ 纠错块数/ 块内码字数/数据码字数(码字数-RS码字数)typedef struct tagRS_BLOCKINFO BYTE ncRSBlock;BYTE ncAllCodeWord;BYTE ncDataCodeWord;BYTE ncR; RS_BLOCKINFO, *LPRS_BLOCKINFO;/QRcode 版本相关信息typedef struct tagQR_VERSIONINFOint nVersi

2、onNo; / 版本号 1-40int ncAllCodeWord; / 总码字数int ncDataCodeWord4; / 数据码(字数 L,M,Q,H)(总码字-RS 码字)int ncAlignPoint; / 校正点数int nAlignPoint6; / 校正图形中心坐标RS_BLOCKINFO RS_BlockInfo14; / 纠错块信息RS_BLOCKINFO RS_BlockInfo24; / 纠错块信息BYTEBitnum;/剩余位 QR_VERSIONINFO, *LPQR_VERSIONINFO;/ QRcode 相关信息QR_VERSIONINFO QR_Verso

3、nInfo = 0, / Ver.00,0,0,0,0,1,14, 1, / Ver.19,/数据码字数0, 0,/校正图形中心坐标26, 19, 16, 13,0, 0, 0, 0, 0, /纠错块11, 26, 19,2,1, 26, 16,4,1, 26, 13,6,1, 26, 9,8, /纠错块20, 0, 0,0,0, 0, 0,0,0, 0, 0,0,0, 0, 0,0, /剩余位0, 2, / Ver.244, 34, 28, 22, 16,1, 18, 0, 0, 0, 0, 0, /纠错块11, 44, 34,4,1, 44, 28,8,1, 44, 22,11,1, 44

4、, 16,14, /纠错块20, 0, 0,0,0, 0, 0,0,0, 0, 0,0,0, 0, 0,0, 3, / Ver.370, 55, 44, 34, 26,1, 22, 0, 0, 0, 0, 0, /纠错块11, 70, 55,7,1, 70, 44,13,2, 35, 17,9,2, 35, 13,11, /纠错块20, 0, 0,0,0, 0, 0,0,0, 0, 0,0,0, 0, 0,0, 4, / Ver.4100, 80, 64,1, 26, 0, 0,/纠错块11, 100,80,10,2,50,32,9,2,50,24,13,4,25,9,8,/纠错块20,0,0

5、,0,0,0,0,0,0,0,0,0,0,0,0,0, 5, / Ver.5 134, 108, 86, 1, 30, 0, 0,/纠错块148, 36,0, 0, 0,62, 46,0, 0, 0,1, 134, 108,13,2, 67, 43,12,2, 33, 15,9,2, 33, 11,11,/纠错块20,0,0,0,0,0,0,0,2,34,16,9,2,34,12,11, 6, / Ver.6172, 136,108,76,60,1, 34, 0,0,0,0, 0,2, 86, 68,9,4, 43, 27,8,4, 43, 19,12,4, 43, 15,14,/纠错块20,

6、0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 7, / Ver.7196, 156, 124, 88, 66,2, 22, 38, 0, 0, 0, 0,/纠错块12, 98, 78,10,4, 49, 31,9,2, 32, 14,9,4, 39, 13,13,/纠错块20, 0, 0,0,0, 0, 0,0,4, 33, 15,9,1, 40, 14,13, 8, / Ver.8242, 194, 154, 110,2, 24, 42, 0, 0, /纠错块12, 121, 97,12,2, 60, 38,11,4, 40, 18,11,4, 40, 14,13,/纠错块2

7、0, 0, 0,0,2, 61, 39,11,2, 41, 19,11,2, 41, 15,13, 9, / Ver.9292, 232, 182, 132, 2, 26, 46, 0, 0, /纠错块12, 146, 116,15,3, 58, 36,11,4, 36, 16,10,4, 36, 12,12,/纠错块20, 0, 0,0,2, 59, 37,11,4, 37, 17,10,4, 37, 13,12,10, / Ver.10346, 274, 216, 154,2, 28, 50, 0, 0, /纠错块12, 86, 68,9,4, 69, 43,13,6, 43, 19,12

8、,6, 43, 15,14,86,0, 0,100,0, 0,122,0, 0,/纠错块22, 87, 69,9,1, 70, 44,13,2, 44, 20,12,2, 44, 16,14, 11, / Ver.11404, 324, 254, 180, 140,2, 30, 54, 0, 0, 0, 0, /纠错块14, 101, 81,10,1, 80, 50,15,4, 50, 22,14,3, 36, 12,12, /纠错块20, 0, 0,0,4, 81, 51,15,4, 51, 23,14,8, 37, 13,12, 12, / Ver.12 466, 370, 290, 20

9、6, 158,2, 32, 58, 0, 0, 0, 0,2, 116, 92,12,6, 58, 36,11,4, 46, 20,13,7, 42, 14,14,2, 117, 93,12,2, 59, 37,11,6, 47, 21,13,4, 43, 15,14, 13, / Ver.13 532, 428, 334, 244, 180,2, 34, 62, 0, 0, 0, 0,4, 133, 107,13,8, 59, 37,11,8, 44, 20,12,12, 33, 11,11, 0, 0, 0,0,1,60,38,11,4,45,21,12,4,34,12,11,14, /

10、Ver.14581, 461, 365,261,3,26,46, 66,0,3, 145, 115,15,4, 64, 40,12,11, 36, 16,10,11, 36, 12,12,1, 146, 116,15,5, 65, 41,12,5, 37, 17,10,5, 37, 13,12,15, / Ver.15655, 523, 415, 295,3, 26, 48, 70, 0,5, 109, 87,11,5, 65, 41,12,5, 54, 24,15,11, 36, 12,12,1, 110, 88,11,5,66,42,12,7,55,25,15,7,37,13,12,16,

11、 / Ver.16733, 589, 453,325,3,26,50, 74,0,5, 122, 98,12,7, 73, 45,14,15, 43, 19,12,3, 45, 15,15,1, 123, 99,12,3, 74, 46,14,2, 44, 20,12,13, 46, 16,15, 17, / Ver.17815, 647, 507, 367,197,0, 0,223,0, 0,253,0, 0,3, 30, 54, 78, 0, 0, 0,1, 135, 107,14,10, 74, 46,14,1, 50, 22,14,2, 42, 14,14,5, 136, 108,14

12、,1, 75, 47,14,15, 51, 23,14,17, 43, 15,14,18, / Ver.18901, 721, 563, 397,3, 30, 56, 82, 0,5, 150, 120,15,9, 69, 43,13,17, 50, 22,14,2, 42, 14,14,1, 151, 121,15,4, 70, 44,13,1, 51, 23,14,19, 43, 15,14,19, / Ver.19991, 795, 627, 445,3, 30, 58, 86, 0,3, 141, 113,14,3, 70, 44,13,17, 47, 21,13,9, 39, 13,

13、13,4, 142, 114,14,11, 71, 45,13,4, 48, 22,13,16, 40, 14,13,20, / Ver.201085, 861, 669, 485,3, 34, 62, 90, 0,3, 135, 107,14,3, 67, 41,13,15, 54, 24,15,313,0, 0,341,0, 0,385,0, 0,15, 43, 15,14,5, 136, 108,14,13, 68, 42,13,5, 55, 25,15,10, 44, 16,14,21, / Ver.211156, 932, 714, 512, 406,4, 28, 50, 72, 9

14、4, 0, 0,4, 144, 116,14,17, 68, 42,13,17, 50, 22,14,19, 46, 16,15,4, 145, 117,14,0, 0, 0,0,6, 51, 23,14,6, 47, 17,15,22, / Ver.221258, 1006, 782, 568, 442,4, 26,98, 0, 0,50, 74,2, 139, 111,14,17, 74, 46,14,7, 54, 24,15,34, 37, 13,12,7, 140, 112,14,0, 0, 0,0,16, 55, 25,15,0, 0, 0,0,23, / Ver.231364, 1

15、094, 860, 614, 464,4, 30, 54, 78, 102, 0, 0,5, 152, 122,15,14, 76, 48,14,14, 55, 25,15,14, 46, 16,15, 24, / Ver.241474, 1174, 914, 664,4, 28, 54, 80, 106,6, 147, 117,15,6, 73, 45,14,11, 54, 24,15,30, 46, 16,15,4, 148, 118,15,14, 74, 46,14,16, 55, 25,15,2, 47, 17,15,25, / Ver.251588, 1276, 1000, 718,

16、4, 32, 58, 84, 110,8, 132, 106,13,8, 75, 47,14,7, 54, 24,15,22, 45, 15,15,4, 133, 107,13,13, 76, 48,14,22, 55, 25,15,13, 46, 16,15, 26, / Ver.261706, 1370, 1062, 754,4, 30, 58, 86, 114,10, 142, 114,14,19, 74, 46,14,28, 50, 22,14,33, 46, 16,15,514,0, 0,538,0, 0,596,0, 0,27, / Ver.271828, 1468, 1128,

17、808, 628,4, 34, 62, 90, 118, 0, 0,8, 152, 122,15,22, 73, 45,14,8, 53, 23,15,12, 45, 15,15,4, 153, 123,15,3, 74, 46,14,26, 54, 24,15,28, 46, 16,15,28, / Ver.281921, 1531, 1193, 871, 661,5, 26, 50, 74, 98, 122,0,3, 147, 117,15,3, 73, 45,14,4, 54, 24,15,11, 45, 15,15,10, 148, 118,15,23,74,46,14,31,55,2

18、5,15,31,46,16,15,29, / Ver.292051, 1631, 1267, 911, 701,5, 30, 54, 78, 102, 126, 0, 7, 146, 116,15,21, 73, 45,14,1, 53, 23,15,19, 45, 15,15,7, 147, 117,15,7, 74, 46,14,37, 54, 24,15,26, 46, 16,15,30, / Ver.302185, 1735, 1373, 985, 745,5, 26, 52, 78, 104, 130, 0,5, 145, 115,15,19,75,47,14,15,54,24,15

19、,23,45,15,15,10, 146, 116,15,10,76,48,14,25,55,25,15,25,46,16,15,31, / Ver.312323, 1843, 1455, 1033, 793,5, 30, 56, 82, 108, 134, 0,13, 145, 115,15,2, 74, 46,14,42, 54, 24,15,23, 45, 15,15,3, 146, 116,15,29, 75, 47,14,1, 55, 25,15,28, 46, 16,15,32, / Ver.322465, 1955, 1541, 1115, 845,5, 34, 60, 86,

20、112, 138, 0,17, 145, 115,15,10,74,46,14,10,54,24,15,19,45,15,15,0,0,0,0,23,75,47,14,35,55,25,15,35,46,16,15,33, / Ver.332611, 2071, 1631, 1171, 901,5, 30, 58, 86, 114, 142, 0,29,54,24,15,11,45,15,15,1, 146, 116,15,21,75,47,14,19,55,25,15,46,46,16,15,34, / Ver.342761, 2191, 1725, 1231, 961,5, 34, 62,

21、 90, 118, 146, 0,13, 145, 115,15,14,74,46,14,44,54,24,15,59,46,16,15,6, 146, 116,15,23,75,47,14,7,55,25,15,1,47,17,15,35, / Ver.352876, 2306, 1812, 1286, 986,6, 30, 54, 78, 102, 126, 150,12, 151, 121,15,12,75,47,14,39,54,24,15,22,45,15,15,7, 152, 122,15,26,76,48,14,14,55,25,15,41,46,16,15,36, / Ver.

22、363034, 2434, 1914, 1354, 1054,6, 24, 50, 76, 102, 128, 154,6, 151, 121,15,6, 75, 47,14,46, 54, 24,15,2, 45, 15,15,10, 55, 25,15,64, 46, 16,15,37, / Ver.373196, 2566, 1992, 1426, 1096,6, 28, 54, 80, 106, 132, 158,17, 152, 122,15,29,74,46,14,49,54,24,15,24,45,15,15,4, 153, 123,15,14,75,47,14,10,55,25

23、,15,46,46,16,15,38, / Ver.383362, 2702, 2102, 1502, 1142,6, 32, 58, 84, 110, 136, 162,4, 152, 122,15,13,74,46,14,48,54,24,15,42,45,15,15,18, 153, 123,15,32,75,47,14,14,55,25,15,32,46,16,15,39, / Ver.393532, 2812, 2216, 1582, 1222,6, 26, 54, 82, 110, 138, 166, 20, 147, 117,15, 40, 75, 47,14,43, 54, 2

24、4,15, 10, 45, 15,15,4, 148, 118,15,7, 76, 48,14,22,55, 25,15,67, 46, 16,15,40, / Ver.403706, 2956, 2334, 1666, 1276,6, 30, 58, 86, 114, 142, 170, 19, 148, 118,15, 18, 75, 47,14,34, 54, 24,15, 20, 45, 15,15, 6, 149, 119,15, 31, 76, 48,14, 34, 55, 25,15,61, 46, 16,15 ;/纠错数据 / const BYTE byExpToInt = 1

25、, 2, 4, 8, 16, 32, 64, 128, 29, 58, 116, 232, 205, 135, 19, 38,76, 152, 45, 90, 180, 117, 234, 201, 143, 3, 6, 12, 24, 48, 96, 192, 157, 39, 78, 156, 37, 74, 148, 53, 106, 212, 181, 119, 238, 193, 159, 35, 70, 140, 5, 10, 20, 40, 80, 160, 93, 186, 105, 210, 185, 111, 222, 161, 95, 190, 97, 194, 153,

26、 47, 94, 188, 101, 202, 137, 15, 30, 60, 120, 240, 253, 231, 211, 187, 107, 214, 177, 127, 254, 225, 223, 163, 91, 182, 113, 226, 217, 175, 67, 134, 17, 34, 68, 136, 13, 26, 52, 104, 208, 189, 103, 206, 129, 31, 62, 124, 248, 237, 199, 147, 59, 118, 236, 197, 151, 51, 102, 204, 133, 23, 46, 92, 184,

27、 109, 218, 169, 79, 158, 33, 66, 132, 21, 42, 84, 168, 77, 154, 41, 82, 164, 85, 170, 73, 146, 57, 114, 228, 213, 183, 115, 230, 209, 191, 99, 198, 145, 63, 126, 252, 229, 215, 179, 123, 246, 241, 255, 227, 219, 171, 75, 150, 49, 98, 196, 149, 55, 110, 220, 165, 87, 174, 65, 130, 25, 50, 100, 200, 1

28、41,7, 14, 28, 56, 112, 224, 221, 167, 83, 166,81, 162, 89, 178, 121, 242, 249, 239, 195, 155, 43, 86, 172, 69, 138, 9, 18, 36, 72, 144, 61, 122, 244, 245, 247, 243, 251, 235, 203, 139, 11, 22, 44, 88, 176, 125, 250, 233, 207, 131, 27, 54, 108, 216, 173, 71, 142, 1;/const BYTE byIntToExp = 0, 0, 1, 2

29、5, 2, 50, 26, 198, 3, 223, 51, 238, 27, 104, 199, 75,4, 100, 224, 14, 52, 141, 239, 129, 28, 193, 105, 248, 200,8, 76, 113,5, 138, 101, 47, 225, 36, 15, 33, 53, 147, 142, 218, 240, 18, 130, 69,29, 181, 194, 125, 106, 39, 249, 185, 201, 154, 9, 120, 77, 228, 114, 166, 6, 191, 139, 98, 102, 221, 48, 2

30、53, 226, 152, 37, 179, 16, 145, 34, 136, 54, 208, 148, 206, 143, 150, 219, 189, 241, 210, 19, 92, 131, 56, 70, 64, 30, 66, 182, 163, 195, 72, 126, 110, 107, 58, 40, 84, 250, 133, 186, 61, 202, 94, 155, 159, 10, 21, 121, 43, 78, 212, 229, 172, 115, 243, 167, 87, 7, 112, 192, 247, 140, 128, 99, 13, 10

31、3, 74, 222, 237, 49, 197, 254, 24, 227, 165, 153, 119, 38, 184, 180, 124, 17, 68, 146, 217, 35, 32, 137, 46, 55, 63, 209, 91, 149, 188, 207, 205, 144, 135, 151, 178, 220, 252, 190, 97,242, 86, 211, 171, 20, 42, 93, 158, 132, 60, 57, 83,71, 109, 65, 162,31, 45, 67, 216, 183, 123, 164, 118, 196, 23, 7

32、3, 236, 127, 12, 111, 246,108, 161, 59, 82, 41, 157, 85, 170, 251, 96, 134, 177, 187, 204, 62, 90,203, 89, 95, 176, 156, 169, 160, 81, 11, 245, 22, 235, 122, 117, 44, 215,79, 174, 213, 233, 230, 231, 173, 232, 116, 214, 244, 234, 168, 80, 88, 175;/static BYTE byRSExp7 = 87, 229, 146, 149, 238, 102,

33、21;static BYTE byRSExp10 = 251, 67, 46, 61, 118, 70, 64, 94, 32, 45;static BYTE byRSExp13 = 74, 152, 176, 100, 86, 100, 106, 104, 130, 218, 206, 140, 78; static BYTE byRSExp15 = 8, 183, 61, 91, 202, 37, 51, 58, 58, 237, 140, 124, 5, 99, 105;static BYTE byRSExp16 = 120, 104, 107, 109, 102, 161, 76, 3

34、, 91, 191, 147, 169, 182, 194, 225, 120;static BYTE byRSExp17 = 43, 139, 206, 78, 43, 239, 123, 206, 214, 147, 24, 99, 150, 39, 243, 163, 136;static BYTE byRSExp18 = 215, 234, 158, 94, 184, 97, 118, 170, 79, 187, 152, 148, 252, 179, 5, 98, 96, 153;static BYTE byRSExp20 = 17, 60, 79, 50, 61, 163, 26,

35、 187, 202, 180, 221, 225, 83, 239, 156, 164, 212, 212, 188, 190;static BYTE byRSExp22 = 210, 171, 247, 242, 93, 230, 14, 109, 221, 53, 200, 74, 8, 172, 98, 80, 219, 134, 160, 105,165, 231;static BYTE byRSExp24 = 229, 121, 135, 48, 211, 117, 251, 126, 159, 180, 169, 152, 192, 226, 228, 218, 111,0, 11

36、7, 232,87, 96, 227, 21;static BYTE byRSExp26 = 173, 125, 158, 2, 103, 182, 118, 17, 145, 201, 111, 28, 165, 53, 161, 21, 245, 142, 13, 102,48, 227, 153, 145, 218, 70;static BYTE byRSExp28 = 168, 223, 200, 104, 224, 234, 108, 180, 110, 190, 195, 147, 205, 27, 232, 201, 21, 43, 245, 87,42, 195, 212, 1

37、19, 242, 37, 9, 123;static BYTE byRSExp30 = 41, 173, 145, 152, 216, 31, 179, 182, 50, 48, 110, 86, 239, 96, 222, 125, 42, 173, 226, 193,224, 130, 156, 37, 251, 216, 238, 40, 192, 180;static BYTE byRSExp32 = 10, 6, 106, 190, 249, 167, 4, 67, 209, 138, 138, 32, 242, 123, 89, 27, 120, 185, 80, 156,38,

38、69, 171, 60, 28, 222, 80, 52, 254, 185, 220, 241;static BYTE byRSExp34 = 111, 77, 146, 94, 26, 21, 108, 19, 105, 94, 113, 193, 86, 140, 163, 125, 58, 158, 229, 239,218, 103, 56, 70, 114, 61, 183, 129, 167, 13, 98, 62, 129, 51;static BYTE byRSExp36 = 200, 183, 98, 16, 172, 31, 246, 234, 60, 152, 115,

39、 0, 167, 152, 113, 248, 238, 107, 18, 63,218, 37, 87, 210, 105, 177, 120, 74, 121, 196, 117, 251, 113, 233, 30, 120;static BYTE byRSExp38 = 159, 34, 38, 228, 230, 59, 243, 95, 49, 218, 176, 164, 20, 65, 45, 111, 39, 81, 49, 118,113, 222, 193, 250, 242, 168, 217, 41, 164, 247, 177, 30,238, 18, 120, 1

40、53, 60, 193;static BYTE byRSExp40 = 59, 116, 79, 161, 252, 98, 128, 205, 128, 161, 247, 57, 163, 56, 235, 106, 53, 26, 187, 174,226, 104, 170, 7, 175, 35, 181, 114, 88, 41, 47, 163, 125, 134, 72, 20, 232, 53, 35, 15;static BYTE byRSExp42 = 250, 103, 221, 230, 25, 18, 137, 231, 0, 3, 58, 242, 221, 19

41、1, 110, 84, 230, 8, 188, 106,96, 147, 15, 131, 139, 34, 101, 223, 39, 101, 213, 199, 237, 254, 201, 123, 171, 162, 194, 117,50, 96;static BYTE byRSExp44 = 190, 7, 61, 121, 71, 246, 69, 55, 168, 188, 89, 243, 191, 25, 72, 123, 9, 145, 14, 247,1, 238, 44, 78, 143, 62, 224, 126, 118, 114, 68, 163, 52,

42、194, 217, 147, 204, 169, 37, 130,113, 102, 73, 181;static BYTE byRSExp46 = 112, 94, 88, 112, 253, 224, 202, 115, 187, 99, 89, 5, 54, 113, 129, 44, 58, 16, 135, 216,169, 211, 36, 1, 4, 96, 60, 241, 73, 104, 234, 8, 249, 245, 119, 174, 52, 25, 157, 224,43, 202, 223, 19, 82, 15;static BYTE byRSExp48 =

43、228, 25, 196, 130, 211, 146, 60, 24, 251, 90, 39, 102, 240, 61, 178, 63, 46, 123, 115, 18,221, 111, 135, 160, 182, 205, 107, 206,95, 150, 120, 184, 91, 21, 247, 156, 140, 238,191, 11, 94, 227, 84, 50, 163, 39, 34, 108;static BYTE byRSExp50 = 232, 125, 157, 161, 164, 9, 118, 46, 209, 99, 203, 193, 35

44、, 3, 209, 111, 195, 242, 203, 225,46, 13, 32, 160, 126, 209, 130, 160, 242, 215, 242, 75, 77, 42, 189, 32, 113, 65, 124, 69,228, 114, 235, 175, 124, 170, 215, 232, 133, 205;static BYTE byRSExp52 = 116, 50, 86, 186, 50, 220, 251, 89, 192, 46, 86, 127, 124, 19, 184, 233, 151, 215, 22, 14,59, 145, 37,

45、242, 203, 134, 254, 89, 190, 94, 59, 65, 124, 113, 100, 233, 235, 121, 22, 76,86, 97, 39, 242, 200, 220, 101, 33, 239, 254, 116, 51;static BYTE byRSExp54 = 183, 26, 201, 87, 210, 221, 113, 21, 46, 65, 45, 50, 238, 184, 249, 225, 102, 58, 209, 218,109, 165, 26, 95, 184, 192, 52, 245, 35, 254, 238, 17

46、5, 172, 79, 123, 25, 122, 43, 120, 108, 215, 80, 128, 201, 235, 8, 153, 59, 101, 31, 198, 76, 31, 156;2, 91, 248, 163, 36,28, 10, 85, 239, 184,static BYTE byRSExp56 = 106, 120, 107, 157, 164, 216, 112, 116, 201, 202, 229, 6, 144, 254, 155, 135, 208, 170, 209, 12, 139, 127, 142, 182, 249, 177, 174, 1

47、90, 101, 124,61, 10;152, 206, 96, 23, 163, 61, 27, 196, 247, 151, 154, 202, 207, 20, static BYTE byRSExp58 = 82, 116, 26, 247, 66, 27, 62, 107, 252, 182, 200, 185, 235, 55, 251, 242, 210, 144, 154, 237, 176, 141, 192, 248, 152, 249, 206, 85, 253, 142, 65, 165, 125, 23, 24, 30, 122, 240, 214, 6,129,

48、218, 29, 145, 127, 134, 206, 245, 117, 29, 41, 63, 159, 142, 233, 125, 148, 123; static BYTE byRSExp60 = 107, 140,26, 12, 9, 141, 243, 197, 226, 197, 219, 45, 211, 101, 219, 120, 28, 181, 127, 6,100, 247, 2, 205, 198, 57, 115, 219, 101, 109, 160, 82, 37, 38, 238, 49, 160, 209, 121, 86,11, 124, 30, 1

49、81, 84, 25, 194, 87, 65, 102, 190, 220, 70, 27, 209, 16, 89, 7, 33, 240;static BYTE byRSExp62 = 65, 202, 113, 98, 71, 223, 248, 118, 214, 94, 0, 122, 37, 23, 2, 228, 58, 121, 7, 105,135, 78, 243, 118, 70, 76, 223, 89, 72, 50, 70, 111, 194, 17, 212, 126, 181, 35, 221, 117,235, 11, 229, 149, 147, 123,

50、 213, 40, 115, 6, 200, 100, 26, 246, 182, 218, 127, 215, 36, 186,110, 106;static BYTE byRSExp64 = 45, 51, 175, 9, 7, 158, 159, 49, 68, 119, 92, 123, 177, 204, 187, 254, 200, 78, 141, 149,119, 26, 127, 53, 160, 93, 199, 212, 29, 24, 145, 156, 208, 150, 218, 209, 4, 216, 91, 47,184, 146, 47, 140, 195,

51、 195, 125, 242, 238, 63, 99, 108, 140, 230, 242, 31, 204, 11, 178, 243,217, 156, 213, 231;static BYTE byRSExp66 = 5, 118, 222, 180, 136, 136, 162, 51, 46, 117, 13, 215, 81, 17, 139, 247, 197, 171, 95, 173,65, 137, 178, 68, 111, 95, 101, 41, 72, 214, 169, 197, 95, 7, 44, 154, 77, 111, 236, 40,121, 14

52、3, 63, 87, 80, 253, 240, 126, 217, 77, 34, 232, 106, 50, 168, 82, 76, 146, 67, 106,171, 25, 132, 93, 45, 105;static BYTE byRSExp68 = 247, 159, 223, 33, 224, 93, 77, 70, 90, 160, 32, 254, 43, 150, 84, 101, 190, 205, 133, 52,60, 202, 165, 220, 203, 151, 93, 84, 15, 84, 253, 173, 160, 89, 227, 52, 199,

53、 97, 95, 231,52, 177, 41, 125, 137, 241, 166, 225, 118, 2, 54, 32, 82, 215, 175, 198, 43, 238, 235, 27,101, 184, 127, 3, 5, 8, 163, 238;static LPBYTE byRSExp = NULL,NULL,NULL,NULL,NULL,NULL,NULL,byRSExp7,byRSExp10, NULL,NULL,NULL, NULL,byRSExp13, NULL,byRSExp15, byRSExp16,byRSExp17, byRSExp18, NULL,

54、 byRSExp20, NULL,byRSExp22,NULL,byRSExp24,NULL,byRSExp26,NULL,byRSExp28, NULL,byRSExp30, NULL,byRSExp32,NULL,byRSExp34,NULL,byRSExp36,NULL,byRSExp38, NULL,byRSExp40, NULL,byRSExp42,NULL,byRSExp44,NULL,byRSExp46,NULL,byRSExp48, NULL,byRSExp50, NULL,byRSExp52,NULL,byRSExp54,NULL,byRSExp56,NULL,byRSExp

55、58, NULL,byRSExp60, NULL,byRSExp62,NULL,byRSExp64,NULL,byRSExp66,NULL, byRSExp68;const int nIndicatorLenNumeral = 10, 12, 14; const int nIndicatorLenAlphabet = 9, 11, 13;const int nIndicatorLen8Bit= 8, 16, 16;const int nIndicatorLenKanji= 8, 10, 12;/IpbyRSWork:数据输入缓冲区,包含原始数据,运算完成后,后面附加纠错码/ncDataCode

56、Word:数据码字的长度/ncRSCodeWord:纠错码字的长度 void GetRSCodeWord(LPBYTE lpbyRSWork, int ncDataCodeWord, int ncRSCodeWord)int i, j;for (i = 0; i < ncDataCodeWord ; +i)if (lpbyRSWork0 != 0)BYTE nExpFirst = byIntToExplpbyRSWork0;for (j = 0; j < ncRSCodeWord; +j)BYTE nExpElement = (BYTE)(int)(byRSExpncRSCodeWordj + nExpFirst) % 255);lpbyRSWorkj = (BYTE)(lpbyRSWorkj + 1 A byExpTolntnExpElement);for (j = ncRSCodeWord; j < ncDataCodeWord + ncRSCodeWord- 1; +j) lpbyRSWorkj = lpbyRSWorkj + 1;elsefor (j = 0; j < ncDataCodeWord + ncRSCodeWord- 1; +j) lpbyRSWorkj = lpbyRSWorkj + 1;

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!