-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathidTable.c
More file actions
168 lines (155 loc) · 15.2 KB
/
idTable.c
File metadata and controls
168 lines (155 loc) · 15.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
//! @file idTable.c
//! @brief Generated code - do not edit!
#include <stdint.h>
#include <stddef.h>
//! UnreplacableContainerBits is container bit size for unreplacebale bytes.
unsigned unreplacableContainerBits = 7; // 6 bits or 7 bits
//! ID1Max is the max possible number of primary IDs. Its value depends on UnreplacableContainerBits.
unsigned ID1Max = 127; // 7 bits:127 or 6 bits:191
//! ID1Count is the direct ID count. The resulting indirect ID count is (ID1Max - ID1Count) * 255.
unsigned ID1Count = 127;
//! MaxID is a computed value: MaxID = ID1Count + (ID1Max - ID1Count) * 255.
//! It is the max possible amount of pattern in the idTable.
unsigned MaxID = 127;
//! LastID is pattern count inside the idTable. If it is < MaxID, consider increasing ID1Count.
unsigned LastID = 127;
//! maxPatternlength is the size of the longest pattern inside idTable.
uint8_t maxPatternlength = 8;
static uint8_t const idTable[]; // forward declaration
//! IDTable points to the unsed idTable.
uint8_t const * IDTable = idTable;
//! idTable is sorted by pattern length and pattern count.
//! The pattern position + 1 is the replace id.
//! The generator pattern max size was 8 and the list pattern max size is: 8
static uint8_t const idTable[] = { // from Deutsch.txt.SAMPLES
// `ASCII `| count weight id (decimal) id1 id2
2, 0x65, 0x6e, // `en` | 1417 2834 0x0001 ( 1) 01 --
2, 0x65, 0x72, // `er` | 1411 2822 0x0002 ( 2) 02 --
2, 0x63, 0x68, // `ch` | 1073 2146 0x0003 ( 3) 03 --
2, 0x6e, 0x20, // `n ` | 1021 2042 0x0004 ( 4) 04 --
3, 0x65, 0x6e, 0x20, // `en ` | 645 1935 0x0005 ( 5) 05 --
2, 0x20, 0x64, // ` d` | 908 1816 0x0006 ( 6) 06 --
2, 0x64, 0x65, // `de` | 872 1744 0x0007 ( 7) 07 --
3, 0x65, 0x72, 0x20, // `er ` | 574 1722 0x0008 ( 8) 08 --
2, 0x72, 0x20, // `r ` | 802 1604 0x0009 ( 9) 09 --
2, 0x0d, 0x0a, // `˙˙` | 774 1548 0x000a ( 10) 0a --
2, 0x65, 0x20, // `e ` | 761 1522 0x000b ( 11) 0b --
2, 0x74, 0x65, // `te` | 716 1432 0x000c ( 12) 0c --
3, 0x20, 0x64, 0x65, // ` de` | 473 1419 0x000d ( 13) 0d --
2, 0x65, 0x69, // `ei` | 608 1216 0x000e ( 14) 0e --
2, 0x69, 0x65, // `ie` | 578 1156 0x000f ( 15) 0f --
2, 0x6e, 0x64, // `nd` | 576 1152 0x0010 ( 16) 10 --
3, 0x69, 0x63, 0x68, // `ich` | 380 1140 0x0011 ( 17) 11 --
2, 0x74, 0x20, // `t ` | 526 1052 0x0012 ( 18) 12 --
2, 0x61, 0x6e, // `an` | 504 1008 0x0013 ( 19) 13 --
3, 0x64, 0x65, 0x72, // `der` | 336 1008 0x0014 ( 20) 14 --
5, 0x20, 0x64, 0x65, 0x72, 0x20, // ` der ` | 200 1000 0x0015 ( 21) 15 --
2, 0x69, 0x6e, // `in` | 499 998 0x0016 ( 22) 16 --
2, 0x2c, 0x20, // `, ` | 472 944 0x0017 ( 23) 17 --
4, 0x64, 0x65, 0x72, 0x20, // `der ` | 234 936 0x0018 ( 24) 18 --
2, 0x73, 0x20, // `s ` | 458 916 0x0019 ( 25) 19 --
4, 0x20, 0x64, 0x65, 0x72, // ` der` | 229 916 0x001a ( 26) 1a --
2, 0x67, 0x65, // `ge` | 451 902 0x001b ( 27) 1b --
2, 0x62, 0x65, // `be` | 443 886 0x001c ( 28) 1c --
2, 0x75, 0x6e, // `un` | 426 852 0x001d ( 29) 1d --
3, 0x63, 0x68, 0x20, // `ch ` | 283 849 0x001e ( 30) 1e --
2, 0xe2, 0x80, // `˙˙` | 423 846 0x001f ( 31) 1f --
2, 0x73, 0x74, // `st` | 423 846 0x0020 ( 32) 20 --
3, 0x73, 0x63, 0x68, // `sch` | 282 846 0x0021 ( 33) 21 --
3, 0x65, 0x69, 0x6e, // `ein` | 276 828 0x0022 ( 34) 22 --
2, 0x65, 0x73, // `es` | 413 826 0x0023 ( 35) 23 --
4, 0x20, 0x64, 0x69, 0x65, // ` die` | 203 812 0x0024 ( 36) 24 --
2, 0x69, 0x63, // `ic` | 395 790 0x0025 ( 37) 25 --
3, 0x6e, 0x64, 0x20, // `nd ` | 251 753 0x0026 ( 38) 26 --
7, 0xe2, 0x80, 0x9c, 0x0d, 0x0a, 0x0d, 0x0a, // `˙˙˙˙˙˙˙` | 100 700 0x0027 ( 39) 27 --
5, 0x20, 0x75, 0x6e, 0x64, 0x20, // ` und ` | 139 695 0x0028 ( 40) 28 --
3, 0x64, 0x65, 0x6e, // `den` | 229 687 0x0029 ( 41) 29 --
3, 0x20, 0x75, 0x6e, // ` un` | 228 684 0x002a ( 42) 2a --
2, 0x20, 0x73, // ` s` | 337 674 0x002b ( 43) 2b --
3, 0x64, 0x69, 0x65, // `die` | 224 672 0x002c ( 44) 2c --
2, 0x68, 0x65, // `he` | 333 666 0x002d ( 45) 2d --
3, 0x63, 0x68, 0x74, // `cht` | 218 654 0x002e ( 46) 2e --
4, 0x20, 0x75, 0x6e, 0x64, // ` und` | 163 652 0x002f ( 47) 2f --
5, 0x20, 0x64, 0x69, 0x65, 0x20, // ` die ` | 130 650 0x0030 ( 48) 30 --
3, 0x69, 0x65, 0x20, // `ie ` | 216 648 0x0031 ( 49) 31 --
2, 0x72, 0x65, // `re` | 323 646 0x0032 ( 50) 32 --
3, 0x20, 0x64, 0x69, // ` di` | 215 645 0x0033 ( 51) 33 --
4, 0x75, 0x6e, 0x64, 0x20, // `und ` | 158 632 0x0034 ( 52) 34 --
2, 0x73, 0x65, // `se` | 315 630 0x0035 ( 53) 35 --
3, 0x75, 0x6e, 0x64, // `und` | 208 624 0x0036 ( 54) 36 --
2, 0x64, 0x61, // `da` | 309 618 0x0037 ( 55) 37 --
2, 0x20, 0x65, // ` e` | 306 612 0x0038 ( 56) 38 --
3, 0x63, 0x68, 0x65, // `che` | 204 612 0x0039 ( 57) 39 --
3, 0x74, 0x65, 0x6e, // `ten` | 204 612 0x003a ( 58) 3a --
3, 0x74, 0x65, 0x20, // `te ` | 201 603 0x003b ( 59) 3b --
4, 0x64, 0x65, 0x6e, 0x20, // `den ` | 150 600 0x003c ( 60) 3c --
6, 0x80, 0x9c, 0x0d, 0x0a, 0x0d, 0x0a, // `˙˙˙˙˙˙` | 100 600 0x003d ( 61) 3d --
6, 0xe2, 0x80, 0x9c, 0x0d, 0x0a, 0x0d, // `˙˙˙˙˙˙` | 100 600 0x003e ( 62) 3e --
8, 0x21, 0xe2, 0x80, 0x9c, 0x0d, 0x0a, 0x0d, 0x0a, // `!˙˙˙˙˙˙˙`| 75 600 0x003f ( 63) 3f --
2, 0x6e, 0x65, // `ne` | 299 598 0x0040 ( 64) 40 --
2, 0x65, 0x6c, // `el` | 299 598 0x0041 ( 65) 41 --
2, 0x68, 0x20, // `h ` | 292 584 0x0042 ( 66) 42 --
4, 0x64, 0x69, 0x65, 0x20, // `die ` | 142 568 0x0043 ( 67) 43 --
2, 0x73, 0x63, // `sc` | 282 564 0x0044 ( 68) 44 --
4, 0x69, 0x63, 0x68, 0x20, // `ich ` | 141 564 0x0045 ( 69) 45 --
2, 0x61, 0x75, // `au` | 281 562 0x0046 ( 70) 46 --
2, 0xc3, 0xbc, // `˙˙` | 277 554 0x0047 ( 71) 47 --
2, 0x64, 0x20, // `d ` | 276 552 0x0048 ( 72) 48 --
3, 0x61, 0x6e, 0x64, // `and` | 182 546 0x0049 ( 73) 49 --
2, 0x6c, 0x69, // `li` | 272 544 0x004a ( 74) 4a --
4, 0x20, 0x65, 0x69, 0x6e, // ` ein` | 136 544 0x004b ( 75) 4b --
2, 0x64, 0x69, // `di` | 270 540 0x004c ( 76) 4c --
8, 0x54, 0x6f, 0x6e, 0x69, 0x64, 0x61, 0x6e, 0x64, // `Tonidand`| 67 536 0x004d ( 77) 4d --
8, 0x6f, 0x6e, 0x69, 0x64, 0x61, 0x6e, 0x64, 0x65, // `onidande`| 67 536 0x004e ( 78) 4e --
8, 0x80, 0x9c, 0x0d, 0x0a, 0x0d, 0x0a, 0xe2, 0x80, // `˙˙˙˙˙˙˙˙`| 67 536 0x004f ( 79) 4f --
8, 0xe2, 0x80, 0x9c, 0x0d, 0x0a, 0x0d, 0x0a, 0xe2, // `˙˙˙˙˙˙˙˙`| 67 536 0x0050 ( 80) 50 --
8, 0x6e, 0x69, 0x64, 0x61, 0x6e, 0x64, 0x65, 0x6c, // `nidandel`| 67 536 0x0051 ( 81) 51 --
8, 0x9c, 0x0d, 0x0a, 0x0d, 0x0a, 0xe2, 0x80, 0x9e, // `˙˙˙˙˙˙˙˙`| 67 536 0x0052 ( 82) 52 --
4, 0x65, 0x69, 0x6e, 0x65, // `eine` | 133 532 0x0053 ( 83) 53 --
2, 0x20, 0x61, // ` a` | 265 530 0x0054 ( 84) 54 --
5, 0xe2, 0x80, 0x9c, 0x0d, 0x0a, // `˙˙˙˙˙` | 105 525 0x0055 ( 85) 55 --
7, 0x21, 0xe2, 0x80, 0x9c, 0x0d, 0x0a, 0x0d, // `!˙˙˙˙˙˙` | 75 525 0x0056 ( 86) 56 --
3, 0xe2, 0x80, 0x9c, // `˙˙˙` | 174 522 0x0057 ( 87) 57 --
3, 0x6e, 0x64, 0x65, // `nde` | 174 522 0x0058 ( 88) 58 --
3, 0xe2, 0x80, 0x9e, // `˙˙˙` | 174 522 0x0059 ( 89) 59 --
2, 0x69, 0x74, // `it` | 260 520 0x005a ( 90) 5a --
2, 0x20, 0x77, // ` w` | 260 520 0x005b ( 91) 5b --
2, 0x20, 0x75, // ` u` | 253 506 0x005c ( 92) 5c --
5, 0x80, 0x9c, 0x0d, 0x0a, 0x0d, // `˙˙˙˙˙` | 100 500 0x005d ( 93) 5d --
5, 0x9c, 0x0d, 0x0a, 0x0d, 0x0a, // `˙˙˙˙˙` | 100 500 0x005e ( 94) 5e --
3, 0x62, 0x65, 0x72, // `ber` | 166 498 0x005f ( 95) 5f --
4, 0x6c, 0x69, 0x63, 0x68, // `lich` | 123 492 0x0060 ( 96) 60 --
4, 0x65, 0x6e, 0x2c, 0x20, // `en, ` | 123 492 0x0061 ( 97) 61 --
3, 0x20, 0x64, 0x61, // ` da` | 163 489 0x0062 ( 98) 62 --
4, 0x69, 0x63, 0x68, 0x74, // `icht` | 122 488 0x0063 ( 99) 63 --
2, 0x20, 0x69, // ` i` | 243 486 0x0064 ( 100) 64 --
4, 0x20, 0x64, 0x65, 0x6e, // ` den` | 121 484 0x0065 ( 101) 65 --
3, 0x69, 0x6e, 0x20, // `in ` | 161 483 0x0066 ( 102) 66 --
7, 0x0d, 0x0a, 0x0d, 0x0a, 0xe2, 0x80, 0x9e, // `˙˙˙˙˙˙˙` | 69 483 0x0067 ( 103) 67 --
2, 0xc3, 0xa4, // `˙˙` | 239 478 0x0068 ( 104) 68 --
7, 0x6f, 0x6e, 0x69, 0x64, 0x61, 0x6e, 0x64, // `onidand` | 67 469 0x0069 ( 105) 69 --
7, 0x69, 0x64, 0x61, 0x6e, 0x64, 0x65, 0x6c, // `idandel` | 67 469 0x006a ( 106) 6a --
7, 0x9c, 0x0d, 0x0a, 0x0d, 0x0a, 0xe2, 0x80, // `˙˙˙˙˙˙˙` | 67 469 0x006b ( 107) 6b --
7, 0x54, 0x6f, 0x6e, 0x69, 0x64, 0x61, 0x6e, // `Tonidan` | 67 469 0x006c ( 108) 6c --
7, 0x6e, 0x69, 0x64, 0x61, 0x6e, 0x64, 0x65, // `nidande` | 67 469 0x006d ( 109) 6d --
7, 0x80, 0x9c, 0x0d, 0x0a, 0x0d, 0x0a, 0xe2, // `˙˙˙˙˙˙˙` | 67 469 0x006e ( 110) 6e --
3, 0x65, 0x73, 0x20, // `es ` | 156 468 0x006f ( 111) 6f --
5, 0x20, 0x64, 0x65, 0x6e, 0x20, // ` den ` | 93 465 0x0070 ( 112) 70 --
3, 0x6e, 0x2c, 0x20, // `n, ` | 154 462 0x0071 ( 113) 71 --
2, 0x6d, 0x20, // `m ` | 230 460 0x0072 ( 114) 72 --
4, 0x74, 0x65, 0x6e, 0x20, // `ten ` | 115 460 0x0073 ( 115) 73 --
6, 0x21, 0xe2, 0x80, 0x9c, 0x0d, 0x0a, // `!˙˙˙˙˙` | 76 456 0x0074 ( 116) 74 --
2, 0x68, 0x74, // `ht` | 225 450 0x0075 ( 117) 75 --
3, 0x67, 0x65, 0x6e, // `gen` | 149 447 0x0076 ( 118) 76 --
2, 0x6c, 0x65, // `le` | 221 442 0x0077 ( 119) 77 --
2, 0x6e, 0x74, // `nt` | 220 440 0x0078 ( 120) 78 --
2, 0x6e, 0x69, // `ni` | 220 440 0x0079 ( 121) 79 --
4, 0x0d, 0x0a, 0x0d, 0x0a, // `˙˙˙˙` | 110 440 0x007a ( 122) 7a --
2, 0x66, 0x65, // `fe` | 219 438 0x007b ( 123) 7b --
2, 0x61, 0x72, // `ar` | 216 432 0x007c ( 124) 7c --
6, 0x20, 0x6e, 0x69, 0x63, 0x68, 0x74, // ` nicht` | 72 432 0x007d ( 125) 7d --
3, 0x20, 0x65, 0x69, // ` ei` | 143 429 0x007e ( 126) 7e --
3, 0x69, 0x6e, 0x65, // `ine` | 143 429 0x007f ( 127) 7f --
0 // table end marker
};
// tipTableSize is 569.