Credit Andrew R for finding the direct copy mods for exr and ppm sequences
[goodguy/cinelerra.git] / cinelerra-5.1 / libzmpeg3 / huf.C
1 #include <stdio.h>
2 #include <stdint.h>
3 #include "libzmpeg3.h"
4 #include "huf.h"
5
6 // Standard Huffman Tables for Text Compression1/2
7 //   A/65, Annex C
8
9 uint8_t huf::huf100[] = {
10   0xfe, 0xea, 0xfe, 0xfa, 0x53, 0xfe, 0x57, 0x4e,
11   0x54, 0xfe, 0xfe, 0x41, 0x4a, 0xfe, 0xfe, 0x4f,
12   0xfe, 0x55, 0x51, 0xfe, 0x32, 0x37, 0xfe, 0xf6,
13   0xfe, 0xfa, 0xfe, 0x42, 0x49, 0x45, 0x4d, 0x43,
14   0xfe, 0xec, 0xfe, 0xf0, 0x46, 0xfe, 0xfe, 0xf6,
15   0x59, 0xfe, 0xfe, 0x1b, 0x5a, 0xfe, 0x34, 0x24,
16   0x4b, 0x56, 0x52, 0x44, 0xfe, 0xfc, 0x47, 0x4c,
17   0x50, 0x48,
18 };
19
20 uint8_t huf::huf101[] = {
21   0xff, 0x1b,
22 };
23
24 uint8_t huf::huf102[] = {
25   0xff, 0x1b,
26 };
27
28 uint8_t huf::huf103[] = {
29   0xff, 0x1b,
30 };
31
32 uint8_t huf::huf104[] = {
33   0xff, 0x1b,
34 };
35
36 uint8_t huf::huf105[] = {
37   0xff, 0x1b,
38 };
39
40 uint8_t huf::huf106[] = {
41   0xff, 0x1b,
42 };
43
44 uint8_t huf::huf107[] = {
45   0xff, 0x1b,
46 };
47
48 uint8_t huf::huf108[] = {
49   0xff, 0x1b,
50 };
51
52 uint8_t huf::huf109[] = {
53   0xff, 0x1b,
54 };
55
56 uint8_t huf::huf10a[] = {
57   0xff, 0x1b,
58 };
59
60 uint8_t huf::huf10b[] = {
61   0xff, 0x1b,
62 };
63
64 uint8_t huf::huf10c[] = {
65   0xff, 0x1b,
66 };
67
68 uint8_t huf::huf10d[] = {
69   0xff, 0x1b,
70 };
71
72 uint8_t huf::huf10e[] = {
73   0xff, 0x1b,
74 };
75
76 uint8_t huf::huf10f[] = {
77   0xff, 0x1b,
78 };
79
80 uint8_t huf::huf110[] = {
81   0xff, 0x1b,
82 };
83
84 uint8_t huf::huf111[] = {
85   0xff, 0x1b,
86 };
87
88 uint8_t huf::huf112[] = {
89   0xff, 0x1b,
90 };
91
92 uint8_t huf::huf113[] = {
93   0xff, 0x1b,
94 };
95
96 uint8_t huf::huf114[] = {
97   0xff, 0x1b,
98 };
99
100 uint8_t huf::huf115[] = {
101   0xff, 0x1b,
102 };
103
104 uint8_t huf::huf116[] = {
105   0xff, 0x1b,
106 };
107
108 uint8_t huf::huf117[] = {
109   0xff, 0x1b,
110 };
111
112 uint8_t huf::huf118[] = {
113   0xff, 0x1b,
114 };
115
116 uint8_t huf::huf119[] = {
117   0xff, 0x1b,
118 };
119
120 uint8_t huf::huf11a[] = {
121   0xff, 0x1b,
122 };
123
124 uint8_t huf::huf11b[] = {
125   0xff, 0x1b,
126 };
127
128 uint8_t huf::huf11c[] = {
129   0xff, 0x1b,
130 };
131
132 uint8_t huf::huf11d[] = {
133   0xff, 0x1b,
134 };
135
136 uint8_t huf::huf11e[] = {
137   0xff, 0x1b,
138 };
139
140 uint8_t huf::huf11f[] = {
141   0xff, 0x1b,
142 };
143
144 uint8_t huf::huf120[] = {
145   0xfe, 0xd0, 0xfe, 0xea, 0xfe, 0xee, 0xfe, 0x6f,
146   0xfe, 0x47, 0xfe, 0x59, 0xfe, 0xf8, 0xfe, 0x2d,
147   0x39, 0xfe, 0x58, 0x65, 0x32, 0x5a, 0x42, 0x57,
148   0xfe, 0xee, 0xfe, 0x4d, 0xfe, 0xf4, 0xfe, 0x26,
149   0xfe, 0xfc, 0x63, 0x33, 0xfe, 0x64, 0x27, 0x31,
150   0x69, 0x4b, 0xfe, 0x74, 0x61, 0xfe, 0x45, 0x4f,
151   0xfe, 0xe6, 0xfe, 0xee, 0x54, 0xfe, 0xfe, 0x46,
152   0xfe, 0xf8, 0xfe, 0x55, 0x66, 0xfe, 0x6c, 0x51,
153   0xfe, 0x56, 0x1b, 0x62, 0xfe, 0xfc, 0x52, 0x48,
154   0x4e, 0x41, 0xfe, 0xfc, 0x43, 0x53, 0xfe, 0xfc,
155   0x44, 0x50, 0x4c, 0xfe, 0x4a, 0x49,
156 };
157
158 uint8_t huf::huf121[] = {
159   0xfe, 0x00, 0x20, 0x1b,
160 };
161
162 uint8_t huf::huf122[] = {
163   0xff, 0x1b,
164 };
165
166 uint8_t huf::huf123[] = {
167   0xff, 0x1b,
168 };
169
170 uint8_t huf::huf124[] = {
171   0x31, 0x1b,
172 };
173
174 uint8_t huf::huf125[] = {
175   0xff, 0x1b,
176 };
177
178 uint8_t huf::huf126[] = {
179   0x1b, 0x20,
180 };
181
182 uint8_t huf::huf127[] = {
183   0xfe, 0x73, 0xfe, 0xfa, 0xfe, 0x74, 0x64, 0x39,
184   0x20, 0x1b,
185 };
186
187 uint8_t huf::huf128[] = {
188   0xff, 0x1b,
189 };
190
191 uint8_t huf::huf129[] = {
192   0xff, 0x1b,
193 };
194
195 uint8_t huf::huf12a[] = {
196   0xfe, 0xfc, 0x1b, 0x41, 0x48, 0x53,
197 };
198
199 uint8_t huf::huf12b[] = {
200   0xff, 0x1b,
201 };
202
203 uint8_t huf::huf12c[] = {
204   0x1b, 0x20,
205 };
206
207 uint8_t huf::huf12d[] = {
208   0xfe, 0xfa, 0xfe, 0x1b, 0x4d, 0x41, 0xfe, 0xf8,
209   0xfe, 0xfc, 0x31, 0x52, 0x53, 0x54, 0xfe, 0x20,
210   0x55, 0x2d,
211 };
212
213 uint8_t huf::huf12e[] = {
214   0x20, 0xfe, 0xfe, 0xf8, 0xfe, 0x1b, 0x53, 0xfe,
215   0x49, 0x57, 0x2e, 0x00,
216 };
217
218 uint8_t huf::huf12f[] = {
219   0xff, 0x1b,
220 };
221
222 uint8_t huf::huf130[] = {
223   0xfe, 0xfa, 0xfe, 0x00, 0x2d, 0x1b, 0x20, 0x30,
224 };
225
226 uint8_t huf::huf131[] = {
227   0xfe, 0xfa, 0x39, 0xfe, 0x00, 0x1b, 0xfe, 0xfc,
228   0x31, 0x32, 0x20, 0x30,
229 };
230
231 uint8_t huf::huf132[] = {
232   0xfe, 0xfa, 0xfe, 0x30, 0x31, 0x3a, 0x1b, 0x00,
233 };
234
235 uint8_t huf::huf133[] = {
236   0x00, 0xfe, 0x30, 0x1b,
237 };
238
239 uint8_t huf::huf134[] = {
240   0x1b, 0x38,
241 };
242
243 uint8_t huf::huf135[] = {
244   0xff, 0x1b,
245 };
246
247 uint8_t huf::huf136[] = {
248   0xff, 0x1b,
249 };
250
251 uint8_t huf::huf137[] = {
252   0x1b, 0x30,
253 };
254
255 uint8_t huf::huf138[] = {
256   0x1b, 0x20,
257 };
258
259 uint8_t huf::huf139[] = {
260   0xfe, 0xfc, 0x39, 0x30, 0xfe, 0x1b, 0x31, 0x33,
261 };
262
263 uint8_t huf::huf13a[] = {
264   0x1b, 0x20,
265 };
266
267 uint8_t huf::huf13b[] = {
268   0xff, 0x1b,
269 };
270
271 uint8_t huf::huf13c[] = {
272   0xff, 0x1b,
273 };
274
275 uint8_t huf::huf13d[] = {
276   0xff, 0x1b,
277 };
278
279 uint8_t huf::huf13e[] = {
280   0xff, 0x1b,
281 };
282
283 uint8_t huf::huf13f[] = {
284   0x1b, 0x00,
285 };
286
287 uint8_t huf::huf140[] = {
288   0xff, 0x1b,
289 };
290
291 uint8_t huf::huf141[] = {
292   0xfe, 0xec, 0xfe, 0xf8, 0xfe, 0x64, 0x72, 0xfe,
293   0x1b, 0x73, 0x20, 0xfe, 0xfe, 0xfc, 0x63, 0x66,
294   0x77, 0xfe, 0x67, 0x74, 0xfe, 0xfc, 0x6c, 0x6e,
295   0xfe, 0x6d, 0xfe, 0xfa, 0x75, 0xfe, 0x62, 0x69,
296   0xfe, 0xf8, 0xfe, 0xfc, 0x2a, 0x2d, 0x2e, 0x76,
297   0x42, 0x70,
298 };
299
300 uint8_t huf::huf142[] = {
301   0xfe, 0xf4, 0xfe, 0x65, 0xfe, 0x72, 0x43, 0xfe,
302   0x1b, 0xfe, 0x41, 0x53, 0xfe, 0xfa, 0x75, 0xfe,
303   0x69, 0x6c, 0x6f, 0x61,
304 };
305
306 uint8_t huf::huf143[] = {
307   0xfe, 0xf0, 0xfe, 0x68, 0x6c, 0xfe, 0xfe, 0xfc,
308   0x75, 0x1b, 0x69, 0xfe, 0xfe, 0x42, 0x41, 0x79,
309   0xfe, 0x6f, 0x61, 0xfe, 0x72, 0xfe, 0x20, 0xfe,
310   0x4f, 0x65,
311 };
312
313 uint8_t huf::huf144[] = {
314   0xfe, 0xf6, 0x6f, 0xfe, 0xfe, 0x72, 0xfe, 0x75,
315   0x79, 0x1b, 0x61, 0xfe, 0x69, 0x65,
316 };
317
318 uint8_t huf::huf145[] = {
319   0xfe, 0xf6, 0xfe, 0xfc, 0x64, 0x78, 0xfe, 0x1b,
320   0x6d, 0x79, 0xfe, 0xf6, 0x76, 0xfe, 0x43, 0xfe,
321   0x73, 0xfe, 0x71, 0x75, 0xfe, 0x61, 0x6c, 0x6e,
322 };
323
324 uint8_t huf::huf146[] = {
325   0xfe, 0xf2, 0xfe, 0xfc, 0x6c, 0x75, 0x6f, 0xfe,
326   0x65, 0xfe, 0x4c, 0xfe, 0x20, 0x1b, 0x61, 0xfe,
327   0x69, 0x72,
328 };
329
330 uint8_t huf::huf147[] = {
331   0xfe, 0xfc, 0x72, 0x6f, 0xfe, 0xf2, 0x69, 0xfe,
332   0xfe, 0xfa, 0x68, 0xfe, 0x2e, 0x6c, 0x1b, 0xfe,
333   0x79, 0x41, 0x65, 0xfe, 0x61, 0x75,
334 };
335
336 uint8_t huf::huf148[] = {
337   0x6f, 0xfe, 0x65, 0xfe, 0x61, 0xfe, 0xfe, 0x69,
338   0x75, 0xfe, 0x00, 0x1b,
339 };
340
341 uint8_t huf::huf149[] = {
342   0x6e, 0xfe, 0xfe, 0xf4, 0xfe, 0xfc, 0x00, 0x1b,
343   0x6d, 0xfe, 0x63, 0xfe, 0x3a, 0x54, 0xfe, 0xfc,
344   0x49, 0x73, 0x74, 0xfe, 0x20, 0xfe, 0x2e, 0x72,
345 };
346
347 uint8_t huf::huf14a[] = {
348   0xfe, 0xfa, 0xfe, 0x61, 0x1b, 0x75, 0x6f, 0x65,
349 };
350
351 uint8_t huf::huf14b[] = {
352   0xfe, 0x69, 0xfe, 0xfc, 0x1b, 0x65, 0xfe, 0xfc,
353   0x61, 0x6f, 0x75, 0x6e,
354 };
355
356 uint8_t huf::huf14c[] = {
357   0xfe, 0xf6, 0x6f, 0xfe, 0xfe, 0x65, 0xfe, 0x75,
358   0x20, 0x1b, 0x61, 0x69,
359 };
360
361 uint8_t huf::huf14d[] = {
362   0xfe, 0xfa, 0x6f, 0xfe, 0x75, 0x79, 0xfe, 0x61,
363   0x69, 0xfe, 0x65, 0xfe, 0x72, 0xfe, 0x63, 0xfe,
364   0xfe, 0x1b, 0x2a, 0x54,
365 };
366
367 uint8_t huf::huf14e[] = {
368   0x65, 0xfe, 0xfe, 0xfa, 0xfe, 0x6f, 0x1b, 0x42,
369   0xfe, 0x69, 0xfe, 0x61, 0xfe, 0xfc, 0x4e, 0x20,
370   0x46, 0x75,
371 };
372
373 uint8_t huf::huf14f[] = {
374   0xfe, 0xf2, 0xfe, 0xfa, 0xfe, 0x20, 0x77, 0x70,
375   0x1b, 0xfe, 0x72, 0xfe, 0x64, 0x73, 0x6e, 0xfe,
376   0xfe, 0x75, 0x6c, 0xfe, 0x66, 0x76,
377 };
378
379 uint8_t huf::huf150[] = {
380   0xfe, 0xf4, 0x61, 0xfe, 0x65, 0xfe, 0xfe, 0x69,
381   0xfe, 0x75, 0x79, 0x2e, 0x72, 0xfe, 0x6f, 0xfe,
382   0x6c, 0xfe, 0xfe, 0xfc, 0x52, 0x47, 0xfe, 0x1b,
383   0x20, 0x73,
384 };
385
386 uint8_t huf::huf151[] = {
387   0xfe, 0x75, 0x1b, 0x56,
388 };
389
390 uint8_t huf::huf152[] = {
391   0xfe, 0xfc, 0x69, 0x6f, 0xfe, 0x65, 0xfe, 0x61,
392   0xfe, 0x75, 0x68, 0x1b,
393 };
394
395 uint8_t huf::huf153[] = {
396   0xfe, 0xfa, 0xfe, 0x74, 0x65, 0x70, 0xfe, 0xf0,
397   0x68, 0xfe, 0x6f, 0xfe, 0xfe, 0xf8, 0xfe, 0xfc,
398   0x2a, 0x6c, 0x71, 0x2e, 0x1b, 0x6b, 0xfe, 0xfc,
399   0x69, 0x75, 0xfe, 0x61, 0x63, 0xfe, 0xfe, 0xfc,
400   0x20, 0x77, 0x6d, 0x6e,
401 };
402
403 uint8_t huf::huf154[] = {
404   0x68, 0xfe, 0xfe, 0xfa, 0x72, 0xfe, 0x61, 0x65,
405   0x6f, 0xfe, 0x69, 0xfe, 0xfe, 0xf8, 0x56, 0xfe,
406   0x1b, 0xfe, 0x2d, 0x4e, 0x75, 0x77,
407 };
408
409 uint8_t huf::huf155[] = {
410   0x6e, 0xfe, 0xfe, 0x70, 0xfe, 0x1b, 0x6c, 0x2e,
411 };
412
413 uint8_t huf::huf156[] = {
414   0xfe, 0x69, 0xfe, 0xfa, 0x00, 0xfe, 0x6f, 0x1b,
415   0xfe, 0x61, 0x65, 0xfe, 0x20, 0x43,
416 };
417
418 uint8_t huf::huf157[] = {
419   0xfe, 0xf4, 0xfe, 0x69, 0xfe, 0x68, 0x72, 0xfe,
420   0xfe, 0x1b, 0x46, 0x57, 0x6f, 0xfe, 0x65, 0x61,
421 };
422
423 uint8_t huf::huf158[] = {
424   0xff, 0x1b,
425 };
426
427 uint8_t huf::huf159[] = {
428   0xfe, 0x6f, 0xfe, 0x65, 0x61, 0x1b,
429 };
430
431 uint8_t huf::huf15a[] = {
432   0xfe, 0x6f, 0x1b, 0x61,
433 };
434
435 uint8_t huf::huf15b[] = {
436   0xff, 0x1b,
437 };
438
439 uint8_t huf::huf15c[] = {
440   0xff, 0x1b,
441 };
442
443 uint8_t huf::huf15d[] = {
444   0xff, 0x1b,
445 };
446
447 uint8_t huf::huf15e[] = {
448   0xff, 0x1b,
449 };
450
451 uint8_t huf::huf15f[] = {
452   0xff, 0x1b,
453 };
454
455 uint8_t huf::huf160[] = {
456   0xff, 0x1b,
457 };
458
459 uint8_t huf::huf161[] = {
460   0xfe, 0xec, 0xfe, 0xf8, 0xfe, 0x6c, 0x79, 0xfe,
461   0x00, 0x76, 0xfe, 0x74, 0xfe, 0x6d, 0x67, 0xfe,
462   0x62, 0xfe, 0x7a, 0x68, 0xfe, 0xee, 0x72, 0xfe,
463   0xfe, 0xf4, 0x64, 0xfe, 0x6b, 0xfe, 0xfe, 0x77,
464   0xfe, 0x66, 0x65, 0x6a, 0x20, 0x69, 0x6e, 0xfe,
465   0x73, 0xfe, 0xfe, 0x63, 0x70, 0xfe, 0xfe, 0x75,
466   0x27, 0xfe, 0x78, 0xfe, 0x1b, 0x3a,
467 };
468
469 uint8_t huf::huf162[] = {
470   0xfe, 0xf6, 0x61, 0xfe, 0x6c, 0xfe, 0x20, 0xfe,
471   0x75, 0x62, 0xfe, 0xfa, 0x79, 0xfe, 0x65, 0x72,
472   0x6f, 0xfe, 0x69, 0xfe, 0xfe, 0x00, 0x73, 0x1b,
473 };
474
475 uint8_t huf::huf163[] = {
476   0xfe, 0xea, 0xfe, 0xf4, 0x74, 0xfe, 0xfe, 0x69,
477   0x73, 0xfe, 0x63, 0xfe, 0x43, 0x4c, 0xfe, 0x61,
478   0x20, 0xfe, 0x75, 0xfe, 0x00, 0x6c, 0xfe, 0xf4,
479   0xfe, 0x68, 0xfe, 0x6f, 0xfe, 0x72, 0x79, 0xfe,
480   0x47, 0x1b, 0x6b, 0x65,
481 };
482
483 uint8_t huf::huf164[] = {
484   0xfe, 0xf8, 0x65, 0xfe, 0xfe, 0x00, 0x79, 0x73,
485   0xfe, 0x20, 0xfe, 0xf8, 0xfe, 0x69, 0xfe, 0x76,
486   0x64, 0x67, 0x61, 0xfe, 0xfe, 0xf6, 0x72, 0xfe,
487   0x6c, 0xfe, 0x77, 0xfe, 0x2e, 0x75, 0x1b, 0x6f,
488 };
489
490 uint8_t huf::huf165[] = {
491   0xfe, 0xe6, 0xfe, 0x20, 0xfe, 0x00, 0xfe, 0xfa,
492   0xfe, 0x79, 0x76, 0x70, 0xfe, 0x64, 0xfe, 0x6f,
493   0xfe, 0xf8, 0xfe, 0xfc, 0x6a, 0x71, 0x75, 0x7a,
494   0x3a, 0x78, 0xfe, 0xde, 0xfe, 0xf6, 0x61, 0xfe,
495   0x6c, 0xfe, 0xfe, 0x63, 0x66, 0x6d, 0xfe, 0xec,
496   0x65, 0xfe, 0xfe, 0xfc, 0x67, 0x6b, 0xfe, 0xfc,
497   0x27, 0x62, 0x69, 0xfe, 0xfe, 0xfc, 0x1b, 0x21,
498   0x2d, 0x68, 0x74, 0x77, 0x72, 0xfe, 0x6e, 0x73,
499 };
500
501 uint8_t huf::huf166[] = {
502   0x20, 0xfe, 0xfe, 0xf8, 0xfe, 0xfc, 0x74, 0x69,
503   0x6f, 0x66, 0x65, 0xfe, 0xfe, 0xfc, 0x00, 0x61,
504   0xfe, 0xfa, 0xfe, 0x6c, 0x75, 0x1b, 0x73, 0x72,
505 };
506
507 uint8_t huf::huf167[] = {
508   0xfe, 0xfc, 0x68, 0x20, 0xfe, 0xf4, 0xfe, 0x65,
509   0x61, 0xfe, 0x72, 0xfe, 0xfe, 0x6e, 0x27, 0x74,
510   0x00, 0xfe, 0xfe, 0xf6, 0xfe, 0x69, 0xfe, 0x6f,
511   0x1b, 0xfe, 0x3a, 0x79, 0xfe, 0x73, 0x75, 0xfe,
512   0x67, 0x6c,
513 };
514
515 uint8_t huf::huf168[] = {
516   0x65, 0xfe, 0xfe, 0xf6, 0x69, 0xfe, 0xfe, 0x20,
517   0xfe, 0x72, 0x79, 0x6e, 0xfe, 0xfc, 0x61, 0x6f,
518   0xfe, 0x74, 0xfe, 0x00, 0xfe, 0xfc, 0x77, 0x1b,
519   0x6c, 0xfe, 0x62, 0x75,
520 };
521
522 uint8_t huf::huf169[] = {
523   0xfe, 0xdc, 0xfe, 0xe4, 0xfe, 0xf8, 0x76, 0xfe,
524   0xfe, 0x61, 0x20, 0x70, 0x64, 0xfe, 0xfe, 0x66,
525   0xfe, 0xfa, 0x62, 0xfe, 0x69, 0x6b, 0xfe, 0xfa,
526   0xfe, 0x00, 0x21, 0x78, 0x1b, 0x7a, 0xfe, 0xfc,
527   0x6f, 0x74, 0x6c, 0x73, 0x6e, 0xfe, 0xfe, 0xfc,
528   0x67, 0x65, 0xfe, 0x63, 0x72, 0x6d,
529 };
530
531 uint8_t huf::huf16a[] = {
532   0x6f, 0xfe, 0x1b, 0x61,
533 };
534
535 uint8_t huf::huf16b[] = {
536   0xfe, 0xea, 0xfe, 0x00, 0xfe, 0xf4, 0xfe, 0xfa,
537   0xfe, 0x3a, 0x54, 0x6f, 0xfe, 0x1b, 0x66, 0x6c,
538   0x73, 0xfe, 0x79, 0xfe, 0x77, 0x61, 0x65, 0xfe,
539   0x69, 0x20,
540 };
541
542 uint8_t huf::huf16c[] = {
543   0xfe, 0xe6, 0xfe, 0xfc, 0x64, 0x69, 0x20, 0xfe,
544   0xfe, 0xf6, 0xfe, 0x73, 0xfe, 0x6b, 0x62, 0xfe,
545   0x27, 0x3a, 0xfe, 0x75, 0xfe, 0x74, 0xfe, 0x1b,
546   0x63, 0x77, 0xfe, 0xfa, 0xfe, 0x6c, 0x00, 0x79,
547   0x65, 0xfe, 0x61, 0xfe, 0xfe, 0x6f, 0xfe, 0xfa,
548   0x66, 0xfe, 0x72, 0x2d, 0x6d, 0x76,
549 };
550
551 uint8_t huf::huf16d[] = {
552   0xfe, 0xee, 0xfe, 0xfa, 0xfe, 0x20, 0x62, 0x6d,
553   0xfe, 0x69, 0x00, 0xfe, 0xfe, 0xfc, 0x79, 0x1b,
554   0x75, 0x73, 0xfe, 0x65, 0xfe, 0x61, 0x70, 0x6f,
555 };
556
557 uint8_t huf::huf16e[] = {
558   0xfe, 0xee, 0xfe, 0xfc, 0x00, 0x64, 0x65, 0xfe,
559   0x73, 0xfe, 0xfe, 0x63, 0xfe, 0x27, 0x76, 0xfe,
560   0x7a, 0x1b, 0xfe, 0xf4, 0xfe, 0x67, 0x69, 0xfe,
561   0xfe, 0x6e, 0x79, 0xfe, 0x3a, 0x66, 0x20, 0xfe,
562   0xfe, 0x74, 0x61, 0xfe, 0xfe, 0xf2, 0xfe, 0xfa,
563   0xfe, 0x75, 0x62, 0x6a, 0xfe, 0xfc, 0x72, 0x68,
564   0x6c, 0x6d, 0x6b, 0x6f,
565 };
566
567 uint8_t huf::huf16f[] = {
568   0xfe, 0xd6, 0xfe, 0xf0, 0xfe, 0xfa, 0x77, 0xfe,
569   0x67, 0x74, 0xfe, 0x6f, 0xfe, 0x00, 0xfe, 0x62,
570   0x78, 0x79, 0xfe, 0xfc, 0x6c, 0x20, 0xfe, 0xfc,
571   0x76, 0x70, 0xfe, 0x64, 0xfe, 0xfa, 0xfe, 0x65,
572   0x27, 0x1b, 0x68, 0xfe, 0xfe, 0x69, 0x3f, 0xfe,
573   0x2e, 0x7a, 0xfe, 0xfa, 0xfe, 0x72, 0x6d, 0x66,
574   0xfe, 0x6e, 0xfe, 0x75, 0xfe, 0x73, 0x63, 0xfe,
575   0x61, 0x6b,
576 };
577
578 uint8_t huf::huf170[] = {
579   0xfe, 0xf8, 0x6f, 0xfe, 0x20, 0xfe, 0x6c, 0x70,
580   0xfe, 0xf2, 0xfe, 0xfa, 0xfe, 0x61, 0x73, 0x72,
581   0x69, 0xfe, 0x74, 0xfe, 0x1b, 0x64, 0xfe, 0x65,
582   0xfe, 0x00, 0x68, 0xfe, 0xfe, 0x79, 0x6d, 0x27,
583 };
584
585 uint8_t huf::huf171[] = {
586   0x1b, 0x75,
587 };
588
589 uint8_t huf::huf172[] = {
590   0xfe, 0xe2, 0xfe, 0xfa, 0x61, 0xfe, 0x79, 0x6c,
591   0x69, 0xfe, 0xfe, 0xf6, 0xfe, 0x6e, 0x6d, 0xfe,
592   0xfe, 0x27, 0x76, 0x1b, 0x72, 0xfe, 0xfe, 0xfc,
593   0x2e, 0x67, 0xfe, 0x63, 0x70, 0x62, 0xfe, 0xfa,
594   0xfe, 0x65, 0x74, 0x00, 0xfe, 0xf2, 0xfe, 0x6f,
595   0x64, 0xfe, 0x6b, 0xfe, 0x75, 0xfe, 0xfe, 0x66,
596   0x3a, 0x2c, 0x73, 0x20,
597 };
598
599 uint8_t huf::huf173[] = {
600   0xfe, 0xd4, 0xfe, 0x20, 0xfe, 0xf4, 0xfe, 0x73,
601   0xfe, 0x68, 0xfe, 0x6b, 0xfe, 0x3a, 0x66, 0x6d,
602   0xfe, 0x69, 0xfe, 0xf8, 0x70, 0xfe, 0xfe, 0x1b,
603   0x72, 0x2e, 0xfe, 0xfa, 0x75, 0xfe, 0x6c, 0x6e,
604   0xfe, 0xfa, 0x79, 0xfe, 0x27, 0x2c, 0xfe, 0xfc,
605   0x3f, 0x43, 0x48, 0x64, 0xfe, 0x00, 0x74, 0xfe,
606   0xfe, 0x65, 0x6f, 0xfe, 0x61, 0x63,
607 };
608
609 uint8_t huf::huf174[] = {
610   0xfe, 0xf6, 0xfe, 0xfa, 0xfe, 0x69, 0x61, 0x73,
611   0x00, 0x65, 0xfe, 0xf6, 0xfe, 0x20, 0xfe, 0x6f,
612   0xfe, 0x6c, 0x62, 0x6d, 0xfe, 0x68, 0xfe, 0xf4,
613   0xfe, 0x75, 0xfe, 0x79, 0xfe, 0xfc, 0x64, 0x77,
614   0x1b, 0x27, 0x72, 0xfe, 0xfe, 0x74, 0xfe, 0x63,
615   0xfe, 0x6e, 0x3a, 0x3f,
616 };
617
618 uint8_t huf::huf175[] = {
619   0xfe, 0xea, 0xfe, 0x72, 0xfe, 0xf6, 0x6c, 0xfe,
620   0xfe, 0x69, 0x1b, 0xfe, 0x6b, 0x7a, 0x65, 0xfe,
621   0x61, 0xfe, 0x20, 0xfe, 0x00, 0x66, 0xfe, 0xf6,
622   0xfe, 0x73, 0xfe, 0xfc, 0x64, 0x70, 0x6d, 0x62,
623   0x6e, 0xfe, 0xfe, 0x74, 0x63, 0x67,
624 };
625
626 uint8_t huf::huf176[] = {
627   0xfe, 0x65, 0xfe, 0x69, 0x61, 0xfe, 0x1b, 0xfe,
628   0x73, 0x6f,
629 };
630
631 uint8_t huf::huf177[] = {
632   0xfe, 0xee, 0xfe, 0xfc, 0x61, 0x00, 0xfe, 0x20,
633   0xfe, 0xfa, 0x72, 0xfe, 0x27, 0x62, 0x1b, 0xfe,
634   0x6c, 0x63, 0x73, 0xfe, 0xfe, 0xfc, 0x69, 0x6f,
635   0x6e, 0x65,
636 };
637
638 uint8_t huf::huf178[] = {
639   0xfe, 0xfa, 0xfe, 0x74, 0x61, 0x65, 0xfe, 0xfa,
640   0x69, 0xfe, 0x1b, 0x20, 0x00, 0x70,
641 };
642
643 uint8_t huf::huf179[] = {
644   0x20, 0xfe, 0x00, 0xfe, 0xfe, 0xe8, 0xfe, 0xf6,
645   0xfe, 0x65, 0xfe, 0xfc, 0x64, 0x69, 0x6e, 0x6f,
646   0xfe, 0xfa, 0xfe, 0x27, 0x70, 0x74, 0xfe, 0xfc,
647   0x76, 0x21, 0x61, 0x6d, 0x73, 0xfe, 0xfe, 0xf8,
648   0x77, 0xfe, 0xfe, 0x62, 0x63, 0x2d, 0x1b, 0x6c,
649 };
650
651 uint8_t huf::huf17a[] = {
652   0xfe, 0xfa, 0xfe, 0x61, 0x20, 0x79, 0xfe, 0xfa,
653   0x1b, 0xfe, 0x65, 0x7a, 0x00, 0x69,
654 };
655
656 uint8_t huf::huf17b[] = {
657   0xff, 0x1b,
658 };
659
660 uint8_t huf::huf17c[] = {
661   0xff, 0x1b,
662 };
663
664 uint8_t huf::huf17d[] = {
665   0xff, 0x1b,
666 };
667
668 uint8_t huf::huf17e[] = {
669   0xff, 0x1b,
670 };
671
672 uint8_t huf::huf17f[] = {
673   0xff, 0x1b,
674 };
675
676 uint8_t *huf::huf1[] = {
677   huf100, huf101, huf102, huf103, huf104, huf105, huf106, huf107,
678   huf108, huf109, huf10a, huf10b, huf10c, huf10d, huf10e, huf10f,
679   huf110, huf111, huf112, huf113, huf114, huf115, huf116, huf117,
680   huf118, huf119, huf11a, huf11b, huf11c, huf11d, huf11e, huf11f,
681   huf120, huf121, huf122, huf123, huf124, huf125, huf126, huf127,
682   huf128, huf129, huf12a, huf12b, huf12c, huf12d, huf12e, huf12f,
683   huf130, huf131, huf132, huf133, huf134, huf135, huf136, huf137,
684   huf138, huf139, huf13a, huf13b, huf13c, huf13d, huf13e, huf13f,
685   huf140, huf141, huf142, huf143, huf144, huf145, huf146, huf147,
686   huf148, huf149, huf14a, huf14b, huf14c, huf14d, huf14e, huf14f,
687   huf150, huf151, huf152, huf153, huf154, huf155, huf156, huf157,
688   huf158, huf159, huf15a, huf15b, huf15c, huf15d, huf15e, huf15f,
689   huf160, huf161, huf162, huf163, huf164, huf165, huf166, huf167,
690   huf168, huf169, huf16a, huf16b, huf16c, huf16d, huf16e, huf16f,
691   huf170, huf171, huf172, huf173, huf174, huf175, huf176, huf177,
692   huf178, huf179, huf17a, huf17b, huf17c, huf17d, huf17e, huf17f,
693 };
694
695
696 uint8_t huf::huf200[] = {
697   0xfe, 0xec, 0xfe, 0xf8, 0x50, 0xfe, 0xfe, 0x42,
698   0x4e, 0x4b, 0x41, 0xfe, 0xfe, 0x43, 0xfe, 0xfc,
699   0x49, 0x4f, 0x57, 0x47, 0xfe, 0xf4, 0xfe, 0xfa,
700   0x52, 0xfe, 0x45, 0x4c, 0x53, 0xfe, 0x46, 0x48,
701   0xfe, 0xfc, 0x4a, 0x54, 0xfe, 0x4d, 0xfe, 0x44,
702   0xfe, 0x22, 0x1b, 0x56,
703 };
704
705 uint8_t huf::huf201[] = {
706   0xff, 0x1b,
707 };
708
709 uint8_t huf::huf202[] = {
710   0xff, 0x1b,
711 };
712
713 uint8_t huf::huf203[] = {
714   0xff, 0x1b,
715 };
716
717 uint8_t huf::huf204[] = {
718   0xff, 0x1b,
719 };
720
721 uint8_t huf::huf205[] = {
722   0xff, 0x1b,
723 };
724
725 uint8_t huf::huf206[] = {
726   0xff, 0x1b,
727 };
728
729 uint8_t huf::huf207[] = {
730   0xff, 0x1b,
731 };
732
733 uint8_t huf::huf208[] = {
734   0xff, 0x1b,
735 };
736
737 uint8_t huf::huf209[] = {
738   0xff, 0x1b,
739 };
740
741 uint8_t huf::huf20a[] = {
742   0xff, 0x1b,
743 };
744
745 uint8_t huf::huf20b[] = {
746   0xff, 0x1b,
747 };
748
749 uint8_t huf::huf20c[] = {
750   0xff, 0x1b,
751 };
752
753 uint8_t huf::huf20d[] = {
754   0xff, 0x1b,
755 };
756
757 uint8_t huf::huf20e[] = {
758   0xff, 0x1b,
759 };
760
761 uint8_t huf::huf20f[] = {
762   0xff, 0x1b,
763 };
764
765 uint8_t huf::huf210[] = {
766   0xff, 0x1b,
767 };
768
769 uint8_t huf::huf211[] = {
770   0xff, 0x1b,
771 };
772
773 uint8_t huf::huf212[] = {
774   0xff, 0x1b,
775 };
776
777 uint8_t huf::huf213[] = {
778   0xff, 0x1b,
779 };
780
781 uint8_t huf::huf214[] = {
782   0xff, 0x1b,
783 };
784
785 uint8_t huf::huf215[] = {
786   0xff, 0x1b,
787 };
788
789 uint8_t huf::huf216[] = {
790   0xff, 0x1b,
791 };
792
793 uint8_t huf::huf217[] = {
794   0xff, 0x1b,
795 };
796
797 uint8_t huf::huf218[] = {
798   0xff, 0x1b,
799 };
800
801 uint8_t huf::huf219[] = {
802   0xff, 0x1b,
803 };
804
805 uint8_t huf::huf21a[] = {
806   0xff, 0x1b,
807 };
808
809 uint8_t huf::huf21b[] = {
810   0xff, 0x1b,
811 };
812
813 uint8_t huf::huf21c[] = {
814   0xff, 0x1b,
815 };
816
817 uint8_t huf::huf21d[] = {
818   0xff, 0x1b,
819 };
820
821 uint8_t huf::huf21e[] = {
822   0xff, 0x1b,
823 };
824
825 uint8_t huf::huf21f[] = {
826   0xff, 0x1b,
827 };
828
829 uint8_t huf::huf220[] = {
830   0xfe, 0xdc, 0xfe, 0xf0, 0xfe, 0xf8, 0xfe, 0x68,
831   0x6d, 0xfe, 0x47, 0x4a, 0x6f, 0xfe, 0xfe, 0x72,
832   0x4e, 0x50, 0xfe, 0x61, 0xfe, 0xf8, 0xfe, 0x53,
833   0x57, 0xfe, 0x32, 0x45, 0xfe, 0xfa, 0x42, 0xfe,
834   0x46, 0x31, 0x4c, 0x6c, 0xfe, 0xe4, 0xfe, 0xf6,
835   0xfe, 0xfa, 0x64, 0xfe, 0x65, 0x67, 0x41, 0x63,
836   0xfe, 0xf2, 0xfe, 0x69, 0xfe, 0x4d, 0xfe, 0x6e,
837   0xfe, 0x4f, 0xfe, 0x1b, 0x37, 0x5a, 0x70, 0x62,
838   0xfe, 0xee, 0xfe, 0x74, 0x77, 0xfe, 0xfe, 0xf8,
839   0x4b, 0xfe, 0xfe, 0x49, 0x34, 0x71, 0x54, 0xfe,
840   0x79, 0x6a, 0xfe, 0xfc, 0x73, 0x66, 0xfe, 0xfa,
841   0x43, 0xfe, 0x44, 0x48, 0xfe, 0xfa, 0x52, 0xfe,
842   0x6b, 0x75, 0xfe, 0xfa, 0x76, 0xfe, 0x22, 0x55,
843   0xfe, 0xfc, 0x56, 0x59, 0xfe, 0xfc, 0x28, 0x33,
844   0x35, 0xfe, 0x2d, 0x2f,
845 };
846
847 uint8_t huf::huf221[] = {
848   0xff, 0x1b,
849 };
850
851 uint8_t huf::huf222[] = {
852   0xfe, 0xf8, 0xfe, 0xfc, 0x00, 0x2e, 0x48, 0x54,
853   0x1b, 0x20,
854 };
855
856 uint8_t huf::huf223[] = {
857   0xff, 0x1b,
858 };
859
860 uint8_t huf::huf224[] = {
861   0xff, 0x1b,
862 };
863
864 uint8_t huf::huf225[] = {
865   0xff, 0x1b,
866 };
867
868 uint8_t huf::huf226[] = {
869   0xff, 0x1b,
870 };
871
872 uint8_t huf::huf227[] = {
873   0xfe, 0x73, 0x1b, 0xfe, 0x20, 0x74,
874 };
875
876 uint8_t huf::huf228[] = {
877   0xff, 0x1b,
878 };
879
880 uint8_t huf::huf229[] = {
881   0x2c, 0x1b,
882 };
883
884 uint8_t huf::huf22a[] = {
885   0xff, 0x1b,
886 };
887
888 uint8_t huf::huf22b[] = {
889   0xff, 0x1b,
890 };
891
892 uint8_t huf::huf22c[] = {
893   0xfe, 0x20, 0x1b, 0x22,
894 };
895
896 uint8_t huf::huf22d[] = {
897   0xfe, 0xf4, 0xfe, 0xfa, 0x61, 0xfe, 0x62, 0x64,
898   0xfe, 0x73, 0x65, 0x66, 0x1b, 0xfe, 0x63, 0xfe,
899   0x20, 0x72,
900 };
901
902 uint8_t huf::huf22e[] = {
903   0xfe, 0x00, 0xfe, 0x20, 0x1b, 0xfe, 0x22, 0xfe,
904   0x4a, 0x53,
905 };
906
907 uint8_t huf::huf22f[] = {
908   0x1b, 0x20,
909 };
910
911 uint8_t huf::huf230[] = {
912   0xfe, 0xfc, 0x30, 0x73, 0xfe, 0xfc, 0x1b, 0x37,
913   0x74, 0x20,
914 };
915
916 uint8_t huf::huf231[] = {
917   0x39, 0xfe, 0x20, 0xfe, 0x38, 0x1b,
918 };
919
920 uint8_t huf::huf232[] = {
921   0x2e, 0xfe, 0xfe, 0x20, 0x36, 0x1b,
922 };
923
924 uint8_t huf::huf233[] = {
925   0x20, 0xfe, 0x1b, 0x30,
926 };
927
928 uint8_t huf::huf234[] = {
929   0x2e, 0xfe, 0x1b, 0x20,
930 };
931
932 uint8_t huf::huf235[] = {
933   0x2e, 0xfe, 0x20, 0x1b,
934 };
935
936 uint8_t huf::huf236[] = {
937   0xff, 0x1b,
938 };
939
940 uint8_t huf::huf237[] = {
941   0x1b, 0xfe, 0x2c, 0x2e,
942 };
943
944 uint8_t huf::huf238[] = {
945   0xff, 0x1b,
946 };
947
948 uint8_t huf::huf239[] = {
949   0xfe, 0xfc, 0x35, 0x36, 0x38, 0xfe, 0x1b, 0x20,
950 };
951
952 uint8_t huf::huf23a[] = {
953   0x1b, 0x20,
954 };
955
956 uint8_t huf::huf23b[] = {
957   0x1b, 0x20,
958 };
959
960 uint8_t huf::huf23c[] = {
961   0xff, 0x1b,
962 };
963
964 uint8_t huf::huf23d[] = {
965   0xff, 0x1b,
966 };
967
968 uint8_t huf::huf23e[] = {
969   0xff, 0x1b,
970 };
971
972 uint8_t huf::huf23f[] = {
973   0x1b, 0x20,
974 };
975
976 uint8_t huf::huf240[] = {
977   0xff, 0x1b,
978 };
979
980 uint8_t huf::huf241[] = {
981   0xfe, 0xfc, 0x6c, 0x6e, 0xfe, 0x20, 0xfe, 0xf8,
982   0xfe, 0xfc, 0x73, 0x74, 0x1b, 0x64, 0xfe, 0x72,
983   0xfe, 0x6d, 0x66, 0x75,
984 };
985
986 uint8_t huf::huf242[] = {
987   0xfe, 0xfc, 0x69, 0x72, 0xfe, 0xf8, 0xfe, 0x61,
988   0x75, 0xfe, 0x1b, 0x6c, 0x6f, 0x65,
989 };
990
991 uint8_t huf::huf243[] = {
992   0xfe, 0xf4, 0x61, 0xfe, 0xfe, 0xfc, 0x79, 0x72,
993   0x75, 0xfe, 0x1b, 0x69, 0x68, 0xfe, 0x6c, 0x6f,
994 };
995
996 uint8_t huf::huf244[] = {
997   0xfe, 0xfc, 0x69, 0x61, 0xfe, 0xfc, 0x65, 0x6f,
998   0xfe, 0xfc, 0x79, 0x72, 0x75, 0x1b,
999 };
1000
1001 uint8_t huf::huf245[] = {
1002   0xfe, 0xf6, 0xfe, 0xfc, 0x64, 0x6c, 0x73, 0xfe,
1003   0x61, 0x69, 0x1b, 0xfe, 0xfe, 0x72, 0x6e, 0x76,
1004 };
1005
1006 uint8_t huf::huf246[] = {
1007   0xfe, 0xfc, 0x1b, 0x6f, 0xfe, 0x72, 0x65, 0x6c,
1008 };
1009
1010 uint8_t huf::huf247[] = {
1011   0xfe, 0xfa, 0xfe, 0x65, 0x1b, 0x6c, 0xfe, 0xfa,
1012   0x69, 0xfe, 0x75, 0x6f, 0x61, 0x72,
1013 };
1014
1015 uint8_t huf::huf248[] = {
1016   0xfe, 0xfa, 0x61, 0xfe, 0x1b, 0x65, 0x6f, 0xfe,
1017   0x69, 0x75,
1018 };
1019
1020 uint8_t huf::huf249[] = {
1021   0xfe, 0xf8, 0xfe, 0xfc, 0x20, 0x49, 0x73, 0x1b,
1022   0xfe, 0x6e, 0x2e, 0x72,
1023 };
1024
1025 uint8_t huf::huf24a[] = {
1026   0x6f, 0xfe, 0xfe, 0xfa, 0xfe, 0x75, 0x1b, 0x2e,
1027   0xfe, 0x61, 0x69, 0x65,
1028 };
1029
1030 uint8_t huf::huf24b[] = {
1031   0x65, 0xfe, 0xfe, 0xfc, 0x61, 0x69, 0x72, 0x1b,
1032 };
1033
1034 uint8_t huf::huf24c[] = {
1035   0xfe, 0xf8, 0x65, 0xfe, 0x75, 0xfe, 0x1b, 0x69,
1036   0x6f, 0x61,
1037 };
1038
1039 uint8_t huf::huf24d[] = {
1040   0x61, 0xfe, 0x69, 0xfe, 0xfe, 0xfa, 0x6f, 0xfe,
1041   0x1b, 0x63, 0x75, 0x65,
1042 };
1043
1044 uint8_t huf::huf24e[] = {
1045   0x65, 0xfe, 0x6f, 0xfe, 0xfe, 0x61, 0x1b, 0x69,
1046 };
1047
1048 uint8_t huf::huf24f[] = {
1049   0xfe, 0xfa, 0x73, 0xfe, 0x27, 0x6e, 0x1b, 0xfe,
1050   0x6c, 0x72,
1051 };
1052
1053 uint8_t huf::huf250[] = {
1054   0x61, 0xfe, 0xfe, 0xf8, 0xfe, 0x6f, 0x69, 0xfe,
1055   0x1b, 0x68, 0xfe, 0x65, 0x72, 0x6c,
1056 };
1057
1058 uint8_t huf::huf251[] = {
1059   0xff, 0x1b,
1060 };
1061
1062 uint8_t huf::huf252[] = {
1063   0xfe, 0xf8, 0xfe, 0x61, 0xfe, 0x69, 0x1b, 0x2e,
1064   0x65, 0x6f,
1065 };
1066
1067 uint8_t huf::huf253[] = {
1068   0xfe, 0xf4, 0xfe, 0x74, 0xfe, 0xfa, 0xfe, 0x2e,
1069   0x76, 0x79, 0x63, 0x69, 0xfe, 0xfa, 0x61, 0xfe,
1070   0x75, 0x1b, 0x68, 0xfe, 0x65, 0x6f,
1071 };
1072
1073 uint8_t huf::huf254[] = {
1074   0x68, 0xfe, 0xfe, 0xf8, 0xfe, 0xfc, 0x56, 0x61,
1075   0x1b, 0x69, 0xfe, 0x6f, 0x72, 0xfe, 0x65, 0x77,
1076 };
1077
1078 uint8_t huf::huf255[] = {
1079   0x2e, 0xfe, 0x1b, 0x6e,
1080 };
1081
1082 uint8_t huf::huf256[] = {
1083   0x69, 0xfe, 0x20, 0xfe, 0x65, 0x1b,
1084 };
1085
1086 uint8_t huf::huf257[] = {
1087   0xfe, 0xfa, 0x6f, 0xfe, 0x1b, 0x68, 0x69, 0xfe,
1088   0x65, 0x61,
1089 };
1090
1091 uint8_t huf::huf258[] = {
1092   0xff, 0x1b,
1093 };
1094
1095 uint8_t huf::huf259[] = {
1096   0x1b, 0x6f,
1097 };
1098
1099 uint8_t huf::huf25a[] = {
1100   0xff, 0x1b,
1101 };
1102
1103 uint8_t huf::huf25b[] = {
1104   0xff, 0x1b,
1105 };
1106
1107 uint8_t huf::huf25c[] = {
1108   0xff, 0x1b,
1109 };
1110
1111 uint8_t huf::huf25d[] = {
1112   0xff, 0x1b,
1113 };
1114
1115 uint8_t huf::huf25e[] = {
1116   0xff, 0x1b,
1117 };
1118
1119 uint8_t huf::huf25f[] = {
1120   0xff, 0x1b,
1121 };
1122
1123 uint8_t huf::huf260[] = {
1124   0xff, 0x1b,
1125 };
1126
1127 uint8_t huf::huf261[] = {
1128   0xfe, 0xe6, 0xfe, 0x6e, 0xfe, 0xfa, 0xfe, 0x73,
1129   0x70, 0x79, 0xfe, 0xfa, 0x67, 0xfe, 0x66, 0x62,
1130   0xfe, 0x64, 0xfe, 0x76, 0xfe, 0x65, 0x7a, 0xfe,
1131   0x68, 0x6f, 0xfe, 0xfc, 0x72, 0x20, 0xfe, 0xf8,
1132   0xfe, 0x6c, 0xfe, 0x63, 0x6b, 0x75, 0xfe, 0x74,
1133   0xfe, 0x6d, 0x69, 0xfe, 0x2e, 0xfe, 0xfe, 0xfc,
1134   0x78, 0x1b, 0x27, 0x77,
1135 };
1136
1137 uint8_t huf::huf262[] = {
1138   0xfe, 0xf8, 0x65, 0xfe, 0xfe, 0x79, 0x6c, 0x20,
1139   0xfe, 0xf2, 0x61, 0xfe, 0xfe, 0x69, 0xfe, 0xfc,
1140   0x1b, 0x2e, 0x62, 0xfe, 0x64, 0x73, 0x6f, 0xfe,
1141   0x72, 0x75,
1142 };
1143
1144 uint8_t huf::huf263[] = {
1145   0xfe, 0xe8, 0xfe, 0xf8, 0xfe, 0x74, 0x75, 0xfe,
1146   0x1b, 0x72, 0xfe, 0x65, 0xfe, 0x69, 0xfe, 0xfa,
1147   0x2c, 0xfe, 0x71, 0x2e, 0x63, 0xfe, 0x44, 0x79,
1148   0xfe, 0xf8, 0xfe, 0x6f, 0xfe, 0x6b, 0x20, 0x6c,
1149   0x61, 0x68,
1150 };
1151
1152 uint8_t huf::huf264[] = {
1153   0xfe, 0xec, 0x65, 0xfe, 0xfe, 0xfa, 0x2e, 0xfe,
1154   0x64, 0x79, 0x6f, 0xfe, 0x72, 0xfe, 0xfe, 0x6c,
1155   0x76, 0xfe, 0x27, 0x3b, 0xfe, 0x20, 0xfe, 0xfc,
1156   0x61, 0x73, 0xfe, 0x69, 0xfe, 0xf8, 0xfe, 0x75,
1157   0xfe, 0x1b, 0x66, 0x6d, 0xfe, 0x2c, 0x6e, 0xfe,
1158   0x77, 0x67,
1159 };
1160
1161 uint8_t huf::huf265[] = {
1162   0xfe, 0xe8, 0xfe, 0xec, 0xfe, 0xf4, 0x64, 0xfe,
1163   0xfe, 0xfc, 0x69, 0x78, 0xfe, 0x2c, 0x62, 0x67,
1164   0x6c, 0xfe, 0x2e, 0xfe, 0x6f, 0x70, 0x6e, 0x73,
1165   0xfe, 0xdc, 0xfe, 0xf0, 0x61, 0xfe, 0x63, 0xfe,
1166   0xfe, 0x6d, 0xfe, 0xfa, 0xfe, 0x2d, 0x29, 0x68,
1167   0x3b, 0x6b, 0xfe, 0xfc, 0x65, 0x74, 0xfe, 0xfc,
1168   0x76, 0x79, 0xfe, 0x77, 0xfe, 0xfa, 0x7a, 0xfe,
1169   0x75, 0x1b, 0x27, 0x66, 0x72, 0x20,
1170 };
1171
1172 uint8_t huf::huf266[] = {
1173   0xfe, 0xf6, 0xfe, 0xfc, 0x65, 0x69, 0xfe, 0x72,
1174   0x74, 0x66, 0x20, 0xfe, 0x6f, 0xfe, 0xfe, 0x61,
1175   0x75, 0xfe, 0x6c, 0xfe, 0x2e, 0x1b,
1176 };
1177
1178 uint8_t huf::huf267[] = {
1179   0xfe, 0xf2, 0x65, 0xfe, 0xfe, 0x68, 0x6f, 0xfe,
1180   0xfe, 0x2e, 0x79, 0xfe, 0x2d, 0x67, 0x20, 0xfe,
1181   0xfe, 0xfa, 0xfe, 0x69, 0x73, 0x75, 0x61, 0xfe,
1182   0xfe, 0xfa, 0x6c, 0xfe, 0x1b, 0x27, 0x2c, 0x72,
1183 };
1184
1185 uint8_t huf::huf268[] = {
1186   0xfe, 0xfa, 0x69, 0xfe, 0x6f, 0x61, 0xfe, 0x65,
1187   0x20, 0xfe, 0xfe, 0xf2, 0xfe, 0xfc, 0x75, 0x2e,
1188   0xfe, 0x6e, 0xfe, 0xfc, 0x27, 0x2c, 0x73, 0x2d,
1189   0x74, 0xfe, 0xfe, 0x72, 0x1b, 0x79,
1190 };
1191
1192 uint8_t huf::huf269[] = {
1193   0xfe, 0xf0, 0xfe, 0x6e, 0xfe, 0x74, 0x72, 0xfe,
1194   0x76, 0xfe, 0x70, 0xfe, 0xfe, 0x20, 0x78, 0x1b,
1195   0xfe, 0xec, 0xfe, 0x73, 0xfe, 0xfc, 0x64, 0x6d,
1196   0x67, 0xfe, 0xfe, 0x66, 0xfe, 0xfc, 0x2e, 0x7a,
1197   0xfe, 0x6b, 0x2c, 0x62, 0xfe, 0xfa, 0x6c, 0xfe,
1198   0x61, 0x6f, 0x65, 0x63,
1199 };
1200
1201 uint8_t huf::huf26a[] = {
1202   0xfe, 0x6f, 0xfe, 0xfc, 0x1b, 0x61, 0x65, 0x75,
1203 };
1204
1205 uint8_t huf::huf26b[] = {
1206   0xfe, 0xf8, 0xfe, 0x20, 0xfe, 0x73, 0x1b, 0x2e,
1207   0xfe, 0x65, 0xfe, 0x69, 0xfe, 0xfc, 0x27, 0x6e,
1208   0xfe, 0x2c, 0x6c, 0x79,
1209 };
1210
1211 uint8_t huf::huf26c[] = {
1212   0xfe, 0xe0, 0xfe, 0xea, 0x61, 0xfe, 0xfe, 0xfc,
1213   0x2e, 0x70, 0xfe, 0xfc, 0x74, 0x2c, 0xfe, 0xfc,
1214   0x1b, 0x62, 0xfe, 0xfc, 0x27, 0x2d, 0x6e, 0x63,
1215   0xfe, 0x69, 0x79, 0xfe, 0x73, 0xfe, 0x66, 0x6d,
1216   0xfe, 0xf2, 0x6c, 0xfe, 0x6f, 0xfe, 0xfe, 0x64,
1217   0x76, 0xfe, 0x75, 0xfe, 0x6b, 0x72, 0x20, 0x65,
1218 };
1219
1220 uint8_t huf::huf26d[] = {
1221   0xfe, 0xfc, 0x61, 0x65, 0xfe, 0xf0, 0xfe, 0xfc,
1222   0x6f, 0x70, 0xfe, 0xf8, 0x62, 0xfe, 0x1b, 0xfe,
1223   0x27, 0x3b, 0x6d, 0x73, 0xfe, 0x20, 0x69, 0xfe,
1224   0xfe, 0x75, 0x79, 0x2e,
1225 };
1226
1227 uint8_t huf::huf26e[] = {
1228   0xfe, 0xd6, 0xfe, 0xfc, 0x67, 0x65, 0xfe, 0xf2,
1229   0xfe, 0x73, 0xfe, 0x63, 0xfe, 0xfc, 0x1b, 0x75,
1230   0xfe, 0x27, 0x7a, 0x66, 0xfe, 0xec, 0x2e, 0xfe,
1231   0xfe, 0xfc, 0x76, 0x79, 0xfe, 0xfa, 0x6c, 0xfe,
1232   0x2d, 0x3b, 0xfe, 0xfc, 0x62, 0x6a, 0x6d, 0x72,
1233   0x6e, 0x69, 0x20, 0xfe, 0x64, 0xfe, 0x74, 0xfe,
1234   0xfe, 0x61, 0x2c, 0xfe, 0x6b, 0x6f,
1235 };
1236
1237 uint8_t huf::huf26f[] = {
1238   0xfe, 0xee, 0xfe, 0xfc, 0x66, 0x20, 0xfe, 0x72,
1239   0xfe, 0x6c, 0x70, 0xfe, 0x6b, 0xfe, 0x2e, 0xfe,
1240   0x2d, 0x2c, 0xfe, 0xe8, 0xfe, 0xf6, 0xfe, 0xfa,
1241   0xfe, 0x73, 0x63, 0x61, 0x74, 0x77, 0xfe, 0x75,
1242   0x6f, 0xfe, 0xfe, 0x76, 0xfe, 0x65, 0x78, 0xfe,
1243   0x42, 0x1b, 0xfe, 0x6e, 0x6d, 0xfe, 0xfe, 0xfa,
1244   0xfe, 0x64, 0x67, 0x68, 0xfe, 0x62, 0x79, 0x69,
1245 };
1246
1247 uint8_t huf::huf270[] = {
1248   0xfe, 0xf2, 0xfe, 0xfc, 0x20, 0x61, 0x6c, 0xfe,
1249   0xfe, 0x6f, 0x73, 0xfe, 0x79, 0x1b, 0xfe, 0xf4,
1250   0x72, 0xfe, 0xfe, 0x69, 0xfe, 0x75, 0x2e, 0xfe,
1251   0x2d, 0x6d, 0x65, 0xfe, 0xfe, 0x68, 0x74, 0x70,
1252 };
1253
1254 uint8_t huf::huf271[] = {
1255   0x1b, 0x75,
1256 };
1257
1258 uint8_t huf::huf272[] = {
1259   0xfe, 0xf0, 0xfe, 0xf8, 0x6f, 0xfe, 0xfe, 0x74,
1260   0x6c, 0x6d, 0x69, 0xfe, 0xfe, 0x73, 0x6e, 0x79,
1261   0xfe, 0xea, 0xfe, 0x65, 0xfe, 0xfa, 0xfe, 0x2e,
1262   0x75, 0x63, 0xfe, 0xfc, 0x2c, 0x67, 0x72, 0xfe,
1263   0x27, 0xfe, 0xfe, 0x1b, 0x29, 0x3b, 0xfe, 0x20,
1264   0xfe, 0x61, 0x64, 0xfe, 0x6b, 0xfe, 0xfe, 0xfc,
1265   0x2d, 0x62, 0x70, 0xfe, 0x76, 0x66,
1266 };
1267
1268 uint8_t huf::huf273[] = {
1269   0x20, 0xfe, 0xfe, 0xea, 0xfe, 0x74, 0x2e, 0xfe,
1270   0x63, 0xfe, 0xfe, 0xfc, 0x79, 0x70, 0xfe, 0xfc,
1271   0x1b, 0x77, 0xfe, 0xfc, 0x22, 0x27, 0x62, 0x6b,
1272   0xfe, 0xf8, 0xfe, 0x65, 0x68, 0xfe, 0x75, 0x61,
1273   0xfe, 0xf4, 0x69, 0xfe, 0xfe, 0x2c, 0x6c, 0xfe,
1274   0xfe, 0x3b, 0x6d, 0x6e, 0x6f, 0x73,
1275 };
1276
1277 uint8_t huf::huf274[] = {
1278   0xfe, 0xea, 0x68, 0xfe, 0xfe, 0xfc, 0x61, 0x73,
1279   0xfe, 0xfc, 0x74, 0x2e, 0x75, 0xfe, 0xfe, 0xfc,
1280   0x2c, 0x6c, 0x6e, 0xfe, 0x2d, 0x6d, 0xfe, 0xfc,
1281   0x6f, 0x65, 0xfe, 0x20, 0xfe, 0x69, 0xfe, 0x72,
1282   0xfe, 0xf8, 0x77, 0xfe, 0xfe, 0x1b, 0x3b, 0x62,
1283   0xfe, 0x79, 0x27, 0x63,
1284 };
1285
1286 uint8_t huf::huf275[] = {
1287   0xfe, 0xf8, 0x72, 0xfe, 0xfe, 0x73, 0x6c, 0x70,
1288   0xfe, 0xf0, 0xfe, 0x74, 0xfe, 0xfa, 0xfe, 0x63,
1289   0x20, 0x62, 0x69, 0xfe, 0xfe, 0x61, 0x1b, 0x6b,
1290   0x6e, 0xfe, 0xfe, 0xfc, 0x64, 0x65, 0x67, 0xfe,
1291   0xfe, 0x6d, 0x79, 0xfe, 0x6f, 0x76,
1292 };
1293
1294 uint8_t huf::huf276[] = {
1295   0xfe, 0x65, 0xfe, 0x69, 0xfe, 0x61, 0x6f, 0xfe,
1296   0x1b, 0xfe, 0x73, 0x79,
1297 };
1298
1299 uint8_t huf::huf277[] = {
1300   0xfe, 0xf0, 0xfe, 0xfc, 0x68, 0x20, 0x61, 0xfe,
1301   0x72, 0xfe, 0xfe, 0xfc, 0x2e, 0x1b, 0x6c, 0x6d,
1302   0x69, 0xfe, 0x6f, 0xfe, 0x65, 0xfe, 0x73, 0x6e,
1303 };
1304
1305 uint8_t huf::huf278[] = {
1306   0xfe, 0xf8, 0x65, 0xfe, 0x69, 0xfe, 0x20, 0x2c,
1307   0x1b, 0xfe, 0xfe, 0x61, 0x2d, 0x74,
1308 };
1309
1310 uint8_t huf::huf279[] = {
1311   0xfe, 0x20, 0xfe, 0xf2, 0xfe, 0xf6, 0xfe, 0x2c,
1312   0xfe, 0xfc, 0x6d, 0x64, 0x69, 0x77, 0x65, 0x73,
1313   0xfe, 0xf4, 0xfe, 0xf8, 0x6c, 0xfe, 0x27, 0xfe,
1314   0x3f, 0x61, 0x1b, 0x6e, 0xfe, 0x2e, 0xfe, 0x6f,
1315   0xfe, 0x3b, 0x62, 0x66,
1316 };
1317
1318 uint8_t huf::huf27a[] = {
1319   0xfe, 0xf8, 0xfe, 0xfc, 0x61, 0x65, 0x6c, 0x7a,
1320   0xfe, 0xfc, 0x1b, 0x6f, 0x69, 0xfe, 0x20, 0x2e,
1321 };
1322
1323 uint8_t huf::huf27b[] = {
1324   0xff, 0x1b,
1325 };
1326
1327 uint8_t huf::huf27c[] = {
1328   0xff, 0x1b,
1329 };
1330
1331 uint8_t huf::huf27d[] = {
1332   0xff, 0x1b,
1333 };
1334
1335 uint8_t huf::huf27e[] = {
1336   0xff, 0x1b,
1337 };
1338
1339 uint8_t huf::huf27f[] = {
1340   0xff, 0x1b,
1341 };
1342
1343 uint8_t *huf::huf2[] = {
1344   huf200, huf201, huf202, huf203, huf204, huf205, huf206, huf207,
1345   huf208, huf209, huf20a, huf20b, huf20c, huf20d, huf20e, huf20f,
1346   huf210, huf211, huf212, huf213, huf214, huf215, huf216, huf217,
1347   huf218, huf219, huf21a, huf21b, huf21c, huf21d, huf21e, huf21f,
1348   huf220, huf221, huf222, huf223, huf224, huf225, huf226, huf227,
1349   huf228, huf229, huf22a, huf22b, huf22c, huf22d, huf22e, huf22f,
1350   huf230, huf231, huf232, huf233, huf234, huf235, huf236, huf237,
1351   huf238, huf239, huf23a, huf23b, huf23c, huf23d, huf23e, huf23f,
1352   huf240, huf241, huf242, huf243, huf244, huf245, huf246, huf247,
1353   huf248, huf249, huf24a, huf24b, huf24c, huf24d, huf24e, huf24f,
1354   huf250, huf251, huf252, huf253, huf254, huf255, huf256, huf257,
1355   huf258, huf259, huf25a, huf25b, huf25c, huf25d, huf25e, huf25f,
1356   huf260, huf261, huf262, huf263, huf264, huf265, huf266, huf267,
1357   huf268, huf269, huf26a, huf26b, huf26c, huf26d, huf26e, huf26f,
1358   huf270, huf271, huf272, huf273, huf274, huf275, huf276, huf277,
1359   huf278, huf279, huf27a, huf27b, huf27c, huf27d, huf27e, huf27f,
1360 };
1361
1362
1363 int huf::
1364 huf_decode(uint8_t **tree, uint8_t *msg, int mlen, char *bfr, int blen)
1365 {
1366   int ch = -1, nch = 0, ret = 0;
1367   int i, k = 0;
1368   char *cp = &bfr[0];
1369 // there are 128 huffman trees used to decode text, using the
1370 //  prior character as the index to the next huffman tree.
1371 //  initial tree index is zero.  termination char is zero.
1372   while( ch && k<mlen && ret<blen ) {
1373     int8_t *bp = (int8_t *)tree[nch];
1374 // negative values are offsets to next left/right branch
1375 // positive values are terminal characters in the tree
1376     for( ch=0; k<mlen; bp-=ch ) {
1377       ch = bp[((msg[k/8] >> (7-k%8)) & 1)];  ++k;
1378       if( zunlikely( ch >= 0 ) ) break;
1379       if( zunlikely( ch == -1 ) ) {
1380         printf("decode error\n");
1381         ch = 0;  break;
1382       }
1383     }
1384 // the escape char quotes the next eight bits
1385     if( zunlikely( ch == 0x1b ) ) {
1386       for(ch=0,i=0; i<8 && k<mlen; ++i ) {
1387         ch = (ch<<1) | ((msg[k/8] >> (7-k%8)) & 1);  ++k;
1388       }
1389     }
1390     *cp++ = ch;
1391     nch = ch < 128 ? ch : 0;
1392     ret = cp - &bfr[0];
1393   }
1394   return ret;
1395 }
1396
1397 #if 0
1398 /* prints out msg "The next" */
1399 /* 010 0 0 01 10010100 01101110 010 00010011 01 010 */
1400 /* 0100 0011 0010 1000 1101 1100 1000 0100 1101 0100 */
1401 uint8_t msg[] =  { 0x43, 0x28, 0xdc, 0x84, 0xd4, 0x00 };
1402
1403 int main(int ac, char **av)
1404 {
1405   char line[128];
1406   int ret = huf_decode(huf1, msg, sizeof(msg)*8, line, sizeof(line));
1407   printf(" ret=%d, line=%s\n", ret, line);
1408   return 0;
1409 }
1410
1411 #endif
1412