comparison mupdf-source/thirdparty/zint/backend/tests/test_code1.c @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 /*
2 libzint - the open source barcode library
3 Copyright (C) 2020-2024 Robin Stuart <rstuart114@gmail.com>
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
8
9 1. Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11 2. Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in the
13 documentation and/or other materials provided with the distribution.
14 3. Neither the name of the project nor the names of its contributors
15 may be used to endorse or promote products derived from this software
16 without specific prior written permission.
17
18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 SUCH DAMAGE.
29 */
30 /* SPDX-License-Identifier: BSD-3-Clause */
31
32 #include "testcommon.h"
33
34 static void test_large(const testCtx *const p_ctx) {
35 int debug = p_ctx->debug;
36
37 struct item {
38 int eci;
39 int option_2;
40 struct zint_structapp structapp;
41 char *pattern;
42 int length;
43 int ret;
44 int expected_rows;
45 int expected_width;
46 char *expected_errtxt;
47 };
48 /* Reference AIM USS Code One Table 2 */
49 /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
50 static const struct item data[] = {
51 /* 0*/ { -1, -1, { 0, 0, "" }, "1", 3550, 0, 148, 134, "" }, /* Auto Version H */
52 /* 1*/ { -1, -1, { 0, 0, "" }, "1", 3551, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
53 /* 2*/ { 3, -1, { 0, 0, "" }, "1", 3535, 0, 148, 134, "" }, /* With ECI */
54 /* 3*/ { 3, -1, { 0, 0, "" }, "1", 3536, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
55 /* 4*/ { -1, -1, { 1, 2, "" }, "1", 3546, 0, 148, 134, "" }, /* With Structured Append (Group mode, count < 2) */
56 /* 5*/ { -1, -1, { 1, 2, "" }, "1", 3547, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
57 /* 6*/ { -1, -1, { 1, 16, "" }, "1", 3541, 0, 148, 134, "" }, /* With Structured Append (Extended Group mode, count >= 16) */
58 /* 7*/ { -1, -1, { 1, 16, "" }, "1", 3542, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
59 /* 8*/ { 3, -1, { 1, 2, "" }, "1", 3532, 0, 148, 134, "" }, /* With ECI and Structured Append (Group mode) 1st symbol */
60 /* 9*/ { 3, -1, { 1, 2, "" }, "1", 3533, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
61 /* 10*/ { 3, -1, { 2, 2, "" }, "1", 3537, 0, 148, 134, "" }, /* With ECI and Structured Append (Group mode) subsequent symbol */
62 /* 11*/ { 3, -1, { 2, 2, "" }, "1", 3538, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
63 /* 12*/ { 3, -1, { 1, 16, "" }, "1", 3530, 0, 148, 134, "" }, /* With ECI and Structured Append (Extended Group mode) 1st symbol */
64 /* 13*/ { 3, -1, { 1, 16, "" }, "1", 3531, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
65 /* 14*/ { 3, -1, { 2, 16, "" }, "1", 3535, 0, 148, 134, "" }, /* With ECI and Structured Append (Extended Group mode) subsequent symbol */
66 /* 15*/ { 3, -1, { 2, 16, "" }, "1", 3536, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
67 /* 16*/ { -1, -1, { 0, 0, "" }, "A", 2218, 0, 148, 134, "" },
68 /* 17*/ { -1, -1, { 0, 0, "" }, "A", 2219, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
69 /* 18*/ { -1, -1, { 0, 0, "" }, "\001", 1480, 0, 148, 134, "" }, /* Full ASCII */
70 /* 19*/ { -1, -1, { 0, 0, "" }, "\001", 1481, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
71 /* 20*/ { -1, -1, { 0, 0, "" }, "\200", 1478, 0, 148, 134, "" }, /* BYTE */
72 /* 21*/ { -1, -1, { 0, 0, "" }, "\200", 1479, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
73 /* 22*/ { -1, 1, { 0, 0, "" }, "1", 22, 0, 16, 18, "" }, /* Version A */
74 /* 23*/ { -1, 1, { 0, 0, "" }, "1", 23, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
75 /* 24*/ { -1, 1, { 0, 0, "" }, "A", 13, 0, 16, 18, "" },
76 /* 25*/ { -1, 1, { 0, 0, "" }, "A", 14, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 12 codewords (maximum 10)" },
77 /* 26*/ { -1, 1, { 0, 0, "" }, "A", 2218, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 1480 codewords (maximum 10)" },
78 /* 27*/ { 3, 1, { 0, 0, "" }, "A", 4, 0, 16, 18, "" }, /* With ECI */
79 /* 28*/ { 3, 1, { 0, 0, "" }, "A", 5, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
80 /* 29*/ { -1, 1, { 1, 2, "" }, "A", 10, 0, 16, 18, "" }, /* With Structured Append */
81 /* 30*/ { -1, 1, { 1, 2, "" }, "A", 11, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 12 codewords (maximum 10)" },
82 /* 31*/ { 3, 1, { 1, 2, "" }, "A", 2, 0, 16, 18, "" }, /* With ECI and Structured Append 1st symbol */
83 /* 32*/ { 3, 1, { 1, 2, "" }, "A", 3, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
84 /* 33*/ { 3, 1, { 2, 2, "" }, "A", 4, 0, 16, 18, "" }, /* With ECI and Structured Append subsequent symbol */
85 /* 34*/ { 3, 1, { 2, 2, "" }, "A", 5, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
86 /* 35*/ { -1, 1, { 0, 0, "" }, "\001", 10, 0, 16, 18, "" },
87 /* 36*/ { -1, 1, { 0, 0, "" }, "\001", 11, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
88 /* 37*/ { -1, 1, { 0, 0, "" }, "\200", 8, 0, 16, 18, "" },
89 /* 38*/ { -1, 1, { 0, 0, "" }, "\200", 9, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
90 /* 39*/ { -1, 2, { 0, 0, "" }, "1", 44, 0, 22, 22, "" }, /* Version B */
91 /* 40*/ { -1, 2, { 0, 0, "" }, "1", 45, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version B, requires 20 codewords (maximum 19)" },
92 /* 41*/ { -1, 2, { 0, 0, "" }, "A", 27, 0, 22, 22, "" },
93 /* 42*/ { -1, 2, { 0, 0, "" }, "A", 28, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version B, requires 21 codewords (maximum 19)" },
94 /* 43*/ { -1, 2, { 0, 0, "" }, "A", 26, 0, 22, 22, "" },
95 /* 44*/ { -1, 2, { 0, 0, "" }, "\001", 19, 0, 22, 22, "" },
96 /* 45*/ { -1, 2, { 0, 0, "" }, "\001", 20, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version B, requires 20 codewords (maximum 19)" },
97 /* 46*/ { -1, 2, { 0, 0, "" }, "\200", 17, 0, 22, 22, "" },
98 /* 47*/ { -1, 2, { 0, 0, "" }, "\200", 18, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version B, requires 20 codewords (maximum 19)" },
99 /* 48*/ { -1, 3, { 0, 0, "" }, "1", 104, 0, 28, 32, "" }, /* Version C */
100 /* 49*/ { -1, 3, { 0, 0, "" }, "1", 105, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version C, requires 45 codewords (maximum 44)" },
101 /* 50*/ { -1, 3, { 0, 0, "" }, "A", 64, 0, 28, 32, "" },
102 /* 51*/ { -1, 3, { 0, 0, "" }, "A", 65, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version C, requires 46 codewords (maximum 44)" },
103 /* 52*/ { -1, 3, { 0, 0, "" }, "\001", 44, 0, 28, 32, "" },
104 /* 53*/ { -1, 3, { 0, 0, "" }, "\001", 45, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version C, requires 45 codewords (maximum 44)" },
105 /* 54*/ { -1, 3, { 0, 0, "" }, "\200", 42, 0, 28, 32, "" },
106 /* 55*/ { -1, 3, { 0, 0, "" }, "\200", 43, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version C, requires 45 codewords (maximum 44)" },
107 /* 56*/ { -1, 4, { 0, 0, "" }, "1", 217, 0, 40, 42, "" }, /* Version D */
108 /* 57*/ { -1, 4, { 0, 0, "" }, "1", 218, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version D, requires 93 codewords (maximum 91)" },
109 /* 58*/ { -1, 4, { 0, 0, "" }, "A", 135, 0, 40, 42, "" },
110 /* 59*/ { -1, 4, { 0, 0, "" }, "A", 136, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version D, requires 93 codewords (maximum 91)" },
111 /* 60*/ { -1, 4, { 0, 0, "" }, "\001", 91, 0, 40, 42, "" },
112 /* 61*/ { -1, 4, { 0, 0, "" }, "\001", 92, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version D, requires 92 codewords (maximum 91)" },
113 /* 62*/ { -1, 4, { 0, 0, "" }, "\200", 89, 0, 40, 42, "" },
114 /* 63*/ { -1, 4, { 0, 0, "" }, "\200", 90, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version D, requires 92 codewords (maximum 91)" },
115 /* 64*/ { -1, 5, { 0, 0, "" }, "1", 435, 0, 52, 54, "" }, /* Version E (note 435 multiple of 3) */
116 /* 65*/ { -1, 5, { 0, 0, "" }, "1", 436, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version E, requires 183 codewords (maximum 182)" },
117 /* 66*/ { -1, 5, { 0, 0, "" }, "1", 434, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version E, requires 183 codewords (maximum 182)" }, /* NOTE: a quirk of decimal end-of-data processing is existence of "lower maxs" if digits are not a multiple of 3 */
118 /* 67*/ { -1, 5, { 0, 0, "" }, "1", 433, 0, 52, 54, "" },
119 /* 68*/ { -1, 5, { 0, 0, "" }, "A", 271, 0, 52, 54, "" },
120 /* 69*/ { -1, 5, { 0, 0, "" }, "A", 272, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version E, requires 184 codewords (maximum 182)" },
121 /* 70*/ { -1, 5, { 0, 0, "" }, "\001", 182, 0, 52, 54, "" },
122 /* 71*/ { -1, 5, { 0, 0, "" }, "\001", 183, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version E, requires 183 codewords (maximum 182)" },
123 /* 72*/ { -1, 5, { 0, 0, "" }, "\200", 180, 0, 52, 54, "" },
124 /* 73*/ { -1, 5, { 0, 0, "" }, "\200", 181, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version E, requires 183 codewords (maximum 182)" },
125 /* 74*/ { -1, 6, { 0, 0, "" }, "1", 886, 0, 70, 76, "" }, /* Version F */
126 /* 75*/ { -1, 6, { 0, 0, "" }, "1", 887, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version F, requires 371 codewords (maximum 370)" },
127 /* 76*/ { -1, 6, { 0, 0, "" }, "A", 553, 0, 70, 76, "" },
128 /* 77*/ { -1, 6, { 0, 0, "" }, "A", 554, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version F, requires 372 codewords (maximum 370)" },
129 /* 78*/ { -1, 6, { 0, 0, "" }, "\001", 370, 0, 70, 76, "" },
130 /* 79*/ { -1, 6, { 0, 0, "" }, "\001", 371, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version F, requires 371 codewords (maximum 370)" },
131 /* 80*/ { -1, 6, { 0, 0, "" }, "\200", 368, 0, 70, 76, "" },
132 /* 81*/ { -1, 6, { 0, 0, "" }, "\200", 369, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version F, requires 372 codewords (maximum 370)" },
133 /* 82*/ { -1, 7, { 0, 0, "" }, "1", 1755, 0, 104, 98, "" }, /* Version G (note 1755 multiple of 3) */
134 /* 83*/ { -1, 7, { 0, 0, "" }, "1", 1756, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 733 codewords (maximum 732)" },
135 /* 84*/ { -1, 7, { 0, 0, "" }, "1", 1754, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 733 codewords (maximum 732)" }, /* NOTE: a quirk of decimal end-of-data processing is existence of "lower maxs" if digits are not a multiple of 3 */
136 /* 85*/ { -1, 7, { 0, 0, "" }, "1", 1753, 0, 104, 98, "" },
137 /* 86*/ { -1, 7, { 0, 0, "" }, "A", 1096, 0, 104, 98, "" },
138 /* 87*/ { -1, 7, { 0, 0, "" }, "A", 1097, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 734 codewords (maximum 732)" },
139 /* 88*/ { -1, 7, { 0, 0, "" }, "\001", 732, 0, 104, 98, "" },
140 /* 89*/ { -1, 7, { 0, 0, "" }, "\001", 733, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 733 codewords (maximum 732)" },
141 /* 90*/ { -1, 7, { 0, 0, "" }, "\200", 730, 0, 104, 98, "" },
142 /* 91*/ { -1, 7, { 0, 0, "" }, "\200", 731, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 734 codewords (maximum 732)" },
143 /* 92*/ { -1, 7, { 0, 0, "" }, "\200", 732, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 735 codewords (maximum 732)" },
144 /* 93*/ { -1, 7, { 0, 0, "" }, "\200", 1478, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 1480 codewords (maximum 732)" },
145 /* 94*/ { -1, 8, { 0, 0, "" }, "1", 3550, 0, 148, 134, "" }, /* Version H */
146 /* 95*/ { -1, 8, { 0, 0, "" }, "1", 3551, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
147 /* 96*/ { -1, 8, { 0, 0, "" }, "A", 2218, 0, 148, 134, "" },
148 /* 97*/ { -1, 8, { 0, 0, "" }, "A", 2219, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
149 /* 98*/ { -1, 8, { 0, 0, "" }, "\001", 1480, 0, 148, 134, "" },
150 /* 99*/ { -1, 8, { 0, 0, "" }, "\001", 1481, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
151 /*100*/ { -1, 8, { 0, 0, "" }, "\200", 1478, 0, 148, 134, "" },
152 /*101*/ { -1, 8, { 0, 0, "" }, "\200", 1479, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
153 /*102*/ { -1, 9, { 0, 0, "" }, "1", 6, 0, 8, 11, "" }, /* Version S-10 */
154 /*103*/ { -1, 9, { 0, 0, "" }, "1", 7, 0, 8, 21, "" }, /* -> S-20 */
155 /*104*/ { -1, 9, { 0, 0, "" }, "1", 12, 0, 8, 21, "" }, /* Version S-20 */
156 /*105*/ { -1, 9, { 0, 0, "" }, "1", 13, 0, 8, 31, "" }, /* -> S-30 */
157 /*106*/ { -1, 9, { 0, 0, "" }, "1", 18, 0, 8, 31, "" }, /* Version S-30 */
158 /*107*/ { -1, 9, { 0, 0, "" }, "1", 19, ZINT_ERROR_TOO_LONG, -1, -1, "Error 514: Input length 19 too long for Version S (maximum 18)" },
159 /*108*/ { -1, 9, { 0, 0, "" }, "1", 17, 0, 8, 31, "" },
160 /*109*/ { -1, 10, { 0, 0, "" }, "1", 22, 0, 16, 17, "" }, /* Version T-16 */
161 /*110*/ { -1, 10, { 0, 0, "" }, "1", 23, 0, 16, 33, "" }, /* -> T-32 */
162 /*111*/ { -1, 10, { 0, 0, "" }, "A", 13, 0, 16, 17, "" },
163 /*112*/ { -1, 10, { 0, 0, "" }, "A", 14, 0, 16, 33, "" }, /* -> T-32 */
164 /*113*/ { -1, 10, { 0, 0, "" }, "\001", 10, 0, 16, 17, "" },
165 /*114*/ { -1, 10, { 0, 0, "" }, "\001", 11, 0, 16, 33, "" }, /* -> T-32 */
166 /*115*/ { -1, 10, { 0, 0, "" }, "\200", 8, 0, 16, 17, "" },
167 /*116*/ { -1, 10, { 0, 0, "" }, "\200", 9, 0, 16, 33, "" }, /* -> T-32 */
168 /*117*/ { -1, 10, { 0, 0, "" }, "1", 56, 0, 16, 33, "" }, /* Version T-32 */
169 /*118*/ { -1, 10, { 0, 0, "" }, "1", 57, 0, 16, 49, "" }, /* -> T-48 */
170 /*119*/ { -1, 10, { 0, 0, "" }, "A", 34, 0, 16, 33, "" },
171 /*120*/ { -1, 10, { 0, 0, "" }, "A", 35, 0, 16, 49, "" }, /* -> T-48 */
172 /*121*/ { -1, 10, { 0, 0, "" }, "\001", 24, 0, 16, 33, "" },
173 /*122*/ { -1, 10, { 0, 0, "" }, "\001", 25, 0, 16, 49, "" }, /* -> T-48 */
174 /*123*/ { -1, 10, { 0, 0, "" }, "\200", 22, 0, 16, 33, "" },
175 /*124*/ { -1, 10, { 0, 0, "" }, "\200", 23, 0, 16, 49, "" }, /* -> T-48 */
176 /*125*/ { -1, 10, { 0, 0, "" }, "1", 90, 0, 16, 49, "" }, /* Version T-48 (note 90 multiple of 3) */
177 /*126*/ { -1, 10, { 0, 0, "" }, "1", 91, ZINT_ERROR_TOO_LONG, -1, -1, "Error 519: Input length 91 too long for Version T (maximum 90)" },
178 /*127*/ { -1, 10, { 0, 0, "" }, "1", 89, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)" }, /* NOTE: a quirk of decimal end-of-data processing is existence of "lower maxs" if digits are not a multiple of 3 */
179 /*128*/ { -1, 10, { 0, 0, "" }, "1", 88, 0, 16, 49, "" },
180 /*129*/ { -1, 10, { 0, 0, "" }, "A", 55, 0, 16, 49, "" },
181 /*130*/ { -1, 10, { 0, 0, "" }, "A", 56, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 40 codewords (maximum 38)" },
182 /*131*/ { -1, 10, { 0, 0, "" }, "A", 90, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 61 codewords (maximum 38)" },
183 /*132*/ { -1, 10, { 0, 0, "" }, "\001", 38, 0, 16, 49, "" },
184 /*133*/ { -1, 10, { 0, 0, "" }, "\001", 39, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)" },
185 /*134*/ { -1, 10, { 0, 0, "" }, "\001", 90, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 90 codewords (maximum 38)" },
186 /*135*/ { -1, 10, { 0, 0, "" }, "\\", 38, 0, 16, 49, "" },
187 /*136*/ { -1, 10, { 0, 0, "" }, "\\", 39, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)" },
188 /*137*/ { -1, 10, { 0, 0, "" }, "\200", 36, 0, 16, 49, "" },
189 /*138*/ { -1, 10, { 0, 0, "" }, "\200", 37, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)" },
190 /*139*/ { -1, 10, { 0, 0, "" }, "AAA\200", 31, 0, 16, 49, "" }, /* ASCII + BYTE (ASCII UpSh - worse than BYTE) */
191 /*140*/ { -1, 10, { 0, 0, "" }, "AAA\200", 32, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 40 codewords (maximum 38)" },
192 /*141*/ { 3, 10, { 0, 0, "" }, "A", 46, 0, 16, 49, "" }, /* Version T-48 with ECI (9 less as PAD escape char + "\123456") */
193 /*142*/ { 3, 10, { 0, 0, "" }, "A", 47, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 40 codewords (maximum 38)" },
194 /*143*/ { 3, 10, { 0, 0, "" }, "\001", 32, 0, 16, 49, "" },
195 /*144*/ { 3, 10, { 0, 0, "" }, "\001", 33, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)" },
196 };
197 const int data_size = ARRAY_SIZE(data);
198 int i, length, ret;
199 struct zint_symbol *symbol = NULL;
200
201 char data_buf[4096];
202
203 testStartSymbol("test_large", &symbol);
204
205 for (i = 0; i < data_size; i++) {
206
207 if (testContinue(p_ctx, i)) continue;
208
209 symbol = ZBarcode_Create();
210 assert_nonnull(symbol, "Symbol not created\n");
211
212 testUtilStrCpyRepeat(data_buf, data[i].pattern, data[i].length);
213 assert_equal(data[i].length, (int) strlen(data_buf), "i:%d length %d != strlen(data_buf) %d\n", i, data[i].length, (int) strlen(data_buf));
214
215 length = testUtilSetSymbol(symbol, BARCODE_CODEONE, -1 /*input_mode*/, data[i].eci, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data_buf, data[i].length, debug);
216 if (data[i].structapp.count) {
217 symbol->structapp = data[i].structapp;
218 }
219
220 ret = ZBarcode_Encode(symbol, (unsigned char *) data_buf, length);
221 assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
222 assert_equal(symbol->errtxt[0] == '\0', ret == 0, "i:%d symbol->errtxt not %s (%s)\n", i, ret ? "set" : "empty", symbol->errtxt);
223 assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected_errtxt);
224
225 if (ret < ZINT_ERROR) {
226 assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows);
227 assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width);
228 }
229
230 ZBarcode_Delete(symbol);
231 }
232
233 testFinish();
234 }
235
236 static void test_input(const testCtx *const p_ctx) {
237 int debug = p_ctx->debug;
238
239 struct item {
240 int input_mode;
241 int eci;
242 int option_2;
243 struct zint_structapp structapp;
244 char *data;
245 int length;
246 int ret;
247 int expected_rows;
248 int expected_width;
249 const char *expected_errtxt;
250 };
251 /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
252 static const struct item data[] = {
253 /* 0*/ { -1, -1, -1, { 0, 0, "" }, "123456789012ABCDEFGHI", -1, 0, 22, 22, "", },
254 /* 1*/ { -1, -1, -1, { 0, 0, "" }, "123456789012ABCDEFGHIJ", -1, 0, 22, 22, "", },
255 /* 2*/ { -1, -1, -1, { 0, 0, "" }, "1", -1, 0, 16, 18, "", },
256 /* 3*/ { -1, -1, 0, { 0, 0, "" }, "1", -1, 0, 16, 18, "", },
257 /* 4*/ { -1, -1, 1, { 0, 0, "" }, "1", -1, 0, 16, 18, "", },
258 /* 5*/ { -1, -1, 1, { 0, 0, "" }, "ABCDEFGHIJKLMN", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 12 codewords (maximum 10)", },
259 /* 6*/ { GS1_MODE, -1, 1, { 0, 0, "" }, "[01]12345678901231", -1, 0, 16, 18, "", },
260 /* 7*/ { GS1_MODE | GS1PARENS_MODE, -1, 1, { 0, 0, "" }, "(01)12345678901231", -1, 0, 16, 18, "", },
261 /* 8*/ { -1, 3, 1, { 0, 0, "" }, "1", -1, 0, 16, 18, "", },
262 /* 9*/ { UNICODE_MODE, 3, 1, { 0, 0, "" }, "é", -1, 0, 16, 18, "", },
263 /* 10*/ { GS1_MODE, 3, 1, { 0, 0, "" }, "[01]12345678901231", -1, ZINT_WARN_INVALID_OPTION, 16, 18, "Warning 512: ECI ignored for GS1 mode", },
264 /* 11*/ { -1, -1, 9, { 0, 0, "" }, "123456789012345678", -1, 0, 8, 31, "", },
265 /* 12*/ { -1, -1, 9, { 0, 0, "" }, "12345678901234567A", -1, ZINT_ERROR_INVALID_DATA, -1, -1, "Error 515: Invalid character at position 18 in input (Version S encodes digits only)", },
266 /* 13*/ { -1, -1, 9, { 0, 0, "" }, "1234567890123456789", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 514: Input length 19 too long for Version S (maximum 18)", },
267 /* 14*/ { GS1_MODE, -1, 9, { 0, 0, "" }, "[01]12345678901231", -1, ZINT_WARN_INVALID_OPTION, 8, 31, "Warning 511: GS1 mode ignored for Version S", },
268 /* 15*/ { -1, 3, 9, { 0, 0, "" }, "1", -1, ZINT_WARN_INVALID_OPTION, 8, 11, "Warning 511: ECI ignored for Version S", },
269 /* 16*/ { GS1_MODE, 3, 9, { 0, 0, "" }, "[01]12345678901231", -1, ZINT_WARN_INVALID_OPTION, 8, 31, "Warning 511: ECI and GS1 mode ignored for Version S", },
270 /* 17*/ { -1, -1, 10, { 0, 0, "" }, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", -1, 0, 16, 49, "", },
271 /* 18*/ { -1, -1, 10, { 0, 0, "" }, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 519: Input length 91 too long for Version T (maximum 90)", },
272 /* 19*/ { -1, -1, 10, { 0, 0, "" }, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", -1, 0, 16, 49, "", },
273 /* 20*/ { -1, -1, 10, { 0, 0, "" }, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 55 codewords (maximum 38)", },
274 /* 21*/ { -1, -1, 10, { 0, 0, "" }, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 38, 0, 16, 49, "", },
275 /* 22*/ { -1, 3, 10, { 0, 0, "" }, "1234567890123456789012345678901234567890123456789012345678901234567890123456", -1, 0, 16, 49, "", },
276 /* 23*/ { -1, 3, 10, { 0, 0, "" }, "12345678901234567890123456789012345678901234567890123456789012345678901234567", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)", },
277 /* 24*/ { -1, 3, 10, { 0, 0, "" }, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 519: Input length 91 too long for Version T (maximum 90)", },
278 /* 25*/ { GS1_MODE, -1, 10, { 0, 0, "" }, "[01]12345678901231", -1, 0, 16, 17, "", },
279 /* 26*/ { GS1_MODE, 3, 10, { 0, 0, "" }, "[01]12345678901231", -1, ZINT_WARN_INVALID_OPTION, 16, 17, "Warning 512: ECI ignored for GS1 mode", },
280 /* 27*/ { -1, -1, 11, { 0, 0, "" }, "1", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 513: Version '11' out of range (1 to 10)", },
281 /* 28*/ { -1, -1, -2, { 0, 0, "" }, "1", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 513: Version '-2' out of range (1 to 10)", },
282 /* 29*/ { GS1_MODE, -1, -1, { 1, 2, "" }, "[01]12345678901231", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 710: Cannot have Structured Append and GS1 mode at the same time", },
283 /* 30*/ { -1, -1, -1, { 1, 1, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 711: Structured Append count '1' out of range (2 to 128)", },
284 /* 31*/ { -1, -1, -1, { 1, -1, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 711: Structured Append count '-1' out of range (2 to 128)", },
285 /* 32*/ { -1, -1, -1, { 1, 129, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 711: Structured Append count '129' out of range (2 to 128)", },
286 /* 33*/ { -1, -1, -1, { 0, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 712: Structured Append index '0' out of range (1 to count 2)", },
287 /* 34*/ { -1, -1, -1, { 3, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 712: Structured Append index '3' out of range (1 to count 2)", },
288 /* 35*/ { -1, -1, -1, { 1, 2, "1" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 713: Structured Append ID not available for Code One", },
289 /* 36*/ { -1, -1, 9, { 1, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 714: Structured Append not available for Version S", },
290 /* 37*/ { -1, -1, 9, { 3, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 714: Structured Append not available for Version S", }, /* Trumps other checking */
291 };
292 const int data_size = ARRAY_SIZE(data);
293 int i, length, ret;
294 struct zint_symbol *symbol = NULL;
295
296 testStartSymbol("test_input", &symbol);
297
298 for (i = 0; i < data_size; i++) {
299
300 if (testContinue(p_ctx, i)) continue;
301
302 symbol = ZBarcode_Create();
303 assert_nonnull(symbol, "Symbol not created\n");
304
305 length = testUtilSetSymbol(symbol, BARCODE_CODEONE, data[i].input_mode, data[i].eci, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
306 if (data[i].structapp.count) {
307 symbol->structapp = data[i].structapp;
308 }
309
310 ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
311 assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
312
313 if (ret < ZINT_ERROR) {
314 assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows);
315 assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width);
316 }
317 assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d symbol->errtxt %s != %s\n", i, symbol->errtxt, data[i].expected_errtxt);
318
319 ZBarcode_Delete(symbol);
320 }
321
322 testFinish();
323 }
324
325 static void test_encode(const testCtx *const p_ctx) {
326 int debug = p_ctx->debug;
327
328 struct item {
329 int input_mode;
330 int eci;
331 int option_2;
332 struct zint_structapp structapp;
333 char *data;
334 int length;
335 int ret;
336
337 int expected_rows;
338 int expected_width;
339 int bwipp_cmp;
340 char *comment;
341 char *expected;
342 };
343 /* Figure examples AIM USS Code One (USSCO) Revision March 3, 2000 */
344 static const struct item data[] = {
345 /* 0*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123456789012", -1, 0, 16, 18, 1, "USSCO Figure 1 (Version A, no padding), same",
346 "111111111111001100"
347 "000110000110010101"
348 "100010110101101010"
349 "000010010110100111"
350 "111010100010101100"
351 "000010000000100000"
352 "111111111111111111"
353 "000000000000000000"
354 "011111111111111110"
355 "010000000000000010"
356 "011111111111111110"
357 "000111011001101110"
358 "010110011110101111"
359 "101000010001101000"
360 "100111000001100000"
361 "101000001010111101"
362 },
363 /* 1*/ { -1, -1, -1, { 0, 0, "" }, "???????????????????????????????????????????????????????????????????????????????????????????", -1, 0, 40, 42, 1, "USSCO Figure 7 (Version D, no padding), same",
364 "010011010001000100011100010001000100110100"
365 "000010000000000000001000000000000000100000"
366 "010010010001000100011000010001000100100100"
367 "000010000000000000001000000000000000100000"
368 "010010010001000100011000010001000100100100"
369 "000010000000000000001000000000000000100000"
370 "010010010001000100011000010001000100100100"
371 "000010000000000000001000000000000000100000"
372 "010010010001000100011000010001000100100100"
373 "000010000000000000001000000000000000100000"
374 "010010010001000100011000010001000100100100"
375 "000010000000000000001000000000000000100000"
376 "010011010001000100011100010001000100110100"
377 "000010000000000000001000000000000000100000"
378 "010010010001000100011000010001000100100100"
379 "000010000000000000001000000000000000100000"
380 "111111111111111111111111111111111111111111"
381 "000000000000000000000000000000000000000000"
382 "011111111111111111111111111111111111111110"
383 "010000000000000000000000000000000000000010"
384 "011111111111111111111111111111111111111110"
385 "010000000000000000000000000000000000000010"
386 "011111111111111111111111111111111111111110"
387 "010000000000000000000000000000000000000010"
388 "011111111111111111111111111111111111111110"
389 "000010000000000000001000000000000000100000"
390 "010010010001000100011000010001000100100100"
391 "000011000000000000001100000000000000110000"
392 "010010010001000100011000010001000100100100"
393 "000010000000000000001000000000000000100000"
394 "010010111100010001111000011011111001100011"
395 "000010001000000000011010101011101000101101"
396 "001110101011100111011000101110010010101011"
397 "101010110000000011011001000100101100100000"
398 "100110011111100011001010001111001100101100"
399 "001110111010110001101011100101111101101100"
400 "101010111111011110111001000100010110100111"
401 "001110010111101000111000010011001011101011"
402 "001010001001110101011000110000111010101100"
403 "101111001111111001001101111000011111110010"
404 },
405 /* 2*/ { -1, -1, 9, { 0, 0, "" }, "1234567890", -1, 0, 8, 21, 1, "USSCO Figure 9 (left) NOTE: S-20 not S-10 as stated, same",
406 "000000011110110010110"
407 "000010000100000010011"
408 "101111110100010100100"
409 "010010001100110001010"
410 "000000000010000000000"
411 "111111111111111111111"
412 "100000000000000000001"
413 "101111111111111111101"
414 },
415 /* 3*/ { -1, -1, 10, { 0, 0, "" }, "12345678901234567890", -1, 0, 16, 17, 1, "USSCO Figure 9 (right) **NOT SAME** different encodation, figure uses ASCII double digits, Zint DECIMAL (same no. of codewords)",
416 "11111111111001100"
417 "00010001010010101"
418 "10001101001101010"
419 "00000101010100111"
420 "11111101010000111"
421 "11011100000100101"
422 "11000001000000111"
423 "01111010010010011"
424 "11111010001101101"
425 "00100011010111111"
426 "00000000100000000"
427 "11111111111111111"
428 "10000000000000001"
429 "10111111111111101"
430 "10000000000000001"
431 "10111111111111101"
432 },
433 /* 4*/ { GS1_MODE, -1, 2, { 0, 0, "" }, "[01]00312341234014[15]950915[10]ABC123456", -1, 0, 22, 22, 1, "USSCO Figure B1 **NOT SAME** using (10) not (30) as (30) no longer compliant",
434 "1110110000110000001010"
435 "1100100010001000111100"
436 "0111100110100100001101"
437 "1100100100101011101111"
438 "1001101111100001000100"
439 "0100101101110000100011"
440 "0100101000101010110101"
441 "0000100000000000100000"
442 "1111111111111111111111"
443 "0000000000000000000000"
444 "0111111111111111111110"
445 "0100000000000000000010"
446 "0111111111111111111110"
447 "0100000000000000000010"
448 "0111111111111111111110"
449 "0100111001001010100111"
450 "1001110100011011100001"
451 "0011101101100110100101"
452 "1101000110001101100000"
453 "1010001101011111101100"
454 "1111101011001110101010"
455 "1010010111000001110111"
456 },
457 /* 5*/ { GS1_MODE | GS1NOCHECK_MODE, -1, 2, { 0, 0, "" }, "[01]00312341234014[15]950915[30]ABC123456", -1, 0, 22, 22, 1, "USSCO Figure B1 same",
458 "1110110000110000001010"
459 "1100100010001000111100"
460 "0111100110100100001101"
461 "1100100100101011101111"
462 "1001101111101001000100"
463 "0100101101000000100011"
464 "0100101000101010110111"
465 "0000100000000000100000"
466 "1111111111111111111111"
467 "0000000000000000000000"
468 "0111111111111111111110"
469 "0100000000000000000010"
470 "0111111111111111111110"
471 "0100000000000000000010"
472 "0111111111111111111110"
473 "0100111001001010101110"
474 "1100100111000101101010"
475 "1011001110001010100000"
476 "0110011100010001101001"
477 "1010101110011010101001"
478 "1101111110110010101110"
479 "1010011100101001110101"
480 },
481 /* 6*/ { -1, -1, -1, { 0, 0, "" }, "Code One", -1, 0, 16, 18, 1, "BWIPP example",
482 "010011011101100110"
483 "010010000001010110"
484 "001010010101100110"
485 "000110000011110110"
486 "100010100000111001"
487 "000010000000100000"
488 "111111111111111111"
489 "000000000000000000"
490 "011111111111111110"
491 "010000000000000010"
492 "011111111111111110"
493 "000100011110101101"
494 "101101000111101011"
495 "010100001110101100"
496 "100001100111100100"
497 "100000111000111000"
498 },
499 /* 7*/ { -1, -1, 9, { 0, 0, "" }, "406990", -1, 0, 8, 11, 1, "BWIPP Version S-10 example",
500 "01101101101"
501 "00101010111"
502 "01101001101"
503 "00100000100"
504 "00000000000"
505 "11111111111"
506 "10000000001"
507 "10111111101"
508 },
509 /* 8*/ { -1, -1, 3, { 0, 0, "" }, "1234567890ABCDEF", -1, 0, 28, 32, 1, "https://fr.wikipedia.org/wiki/Liste_des_symbologies **NOT SAME** as Zint has unlatch to ASCII at end (before padding)",
510 "10001110101011110111011110110101"
511 "11101001001010000011000110101001"
512 "11101001100010111110001000101000"
513 "10011011010100111100010001100001"
514 "10001010001000100010001000101000"
515 "00011000010001000100010001100001"
516 "10001010001000100010001000101000"
517 "00011000010001000100010001100001"
518 "10001010001000100010001000101000"
519 "00011000010001000100010001100001"
520 "00001000000000000000000000100000"
521 "11111111111111111111111111111111"
522 "00000000000000000000000000100000"
523 "11111111111111111111111111111111"
524 "00000000000000000000000000000000"
525 "01111111111111111111111111111110"
526 "01000000000000000000000000000010"
527 "01111111111111111111111111111110"
528 "10001010001000100010001000101000"
529 "00011000010001000100010001100001"
530 "10001010001010101001001100101101"
531 "00011000011001100111111110100001"
532 "01101011001000111101000001100000"
533 "11101010110111100100001100100100"
534 "10111001101111010101010011100101"
535 "11001001100111010000000111101100"
536 "01101001101100000101111100100000"
537 "00111100100000110101111110111001"
538 },
539 /* 9*/ { -1, -1, 1, { 0, 0, "" }, "1", -1, 0, 16, 18, 1, "Version A",
540 "001111100010001000"
541 "001010000100010001"
542 "100010100010001000"
543 "000110000100010001"
544 "100010100010111010"
545 "000010000000100000"
546 "111111111111111111"
547 "000000000000000000"
548 "011111111111111110"
549 "010000000000000010"
550 "011111111111111110"
551 "000100011111101101"
552 "110101011101100011"
553 "001011010100100000"
554 "101000000101100011"
555 "001110100110110101"
556 },
557 /* 10*/ { -1, -1, 2, { 0, 0, "" }, "1", -1, 0, 22, 22, 1, "Version B",
558 "0011111000100010001000"
559 "0010100001000100010001"
560 "1000101000100010001000"
561 "0001100001000100010001"
562 "1000101000100010001000"
563 "0001100001000100010001"
564 "1000101000100010000101"
565 "0000100000000000100000"
566 "1111111111111111111111"
567 "0000000000000000000000"
568 "0111111111111111111110"
569 "0100000000000000000010"
570 "0111111111111111111110"
571 "0100000000000000000010"
572 "0111111111111111111110"
573 "0001000100010001100011"
574 "1011100100100100101111"
575 "1000001000100010101000"
576 "1000101010001101101011"
577 "0011100111110001101010"
578 "0000001101010001100110"
579 "0001001111111101111101"
580 },
581 /* 11*/ { -1, -1, 3, { 0, 0, "" }, "1", -1, 0, 28, 32, 1, "Version C",
582 "00111110001000100010001000111000"
583 "00101000010001000100010001100001"
584 "10001010001000100010001000101000"
585 "00011000010001000100010001100001"
586 "10001010001000100010001000101000"
587 "00011000010001000100010001100001"
588 "10001010001000100010001000101000"
589 "00011000010001000100010001100001"
590 "10001010001000100010001000101000"
591 "00011000010001000100010001100001"
592 "00001000000000000000000000100000"
593 "11111111111111111111111111111111"
594 "00000000000000000000000000100000"
595 "11111111111111111111111111111111"
596 "00000000000000000000000000000000"
597 "01111111111111111111111111111110"
598 "01000000000000000000000000000010"
599 "01111111111111111111111111111110"
600 "10001010001000100010001000101000"
601 "00011000010001000100010001100001"
602 "10001010000011010001010010101000"
603 "00011000010011100110010111100110"
604 "10101001001100010000111010101011"
605 "11111001011001101001001101100100"
606 "11001011100101010101000111100000"
607 "01001000010101111111101101101001"
608 "00001000011000110111001001100111"
609 "10001110101100110010000011111001"
610 },
611 /* 12*/ { -1, -1, 4, { 0, 0, "" }, "1", -1, 0, 40, 42, 1, "Version D",
612 "001111100010001000101100100010001000111000"
613 "001010000100010001001001000100010001100001"
614 "100010100010001000101000100010001000101000"
615 "000110000100010001001001000100010001100001"
616 "100010100010001000101000100010001000101000"
617 "000110000100010001001001000100010001100001"
618 "100010100010001000101000100010001000101000"
619 "000110000100010001001001000100010001100001"
620 "100010100010001000101000100010001000101000"
621 "000110000100010001001001000100010001100001"
622 "100010100010001000101000100010001000101000"
623 "000110000100010001001001000100010001100001"
624 "100011100010001000101100100010001000111000"
625 "000110000100010001001001000100010001100001"
626 "100010100010001000101000100010001000101000"
627 "000010000000000000001000000000000000100000"
628 "111111111111111111111111111111111111111111"
629 "000000000000000000000000000000000000000000"
630 "011111111111111111111111111111111111111110"
631 "010000000000000000000000000000000000000010"
632 "011111111111111111111111111111111111111110"
633 "010000000000000000000000000000000000000010"
634 "011111111111111111111111111111111111111110"
635 "010000000000000000000000000000000000000010"
636 "011111111111111111111111111111111111111110"
637 "000110000100010001001001000100010001100001"
638 "100010100010001000101000100010001000101000"
639 "000111000100010001001101000100010001110001"
640 "100010100010001000101000100010001000101000"
641 "000110000100010001001001000100010001100001"
642 "100010101001100100001011011010110110100000"
643 "000110100110101111011011110010011011101001"
644 "000010010111010100101010110101001011101101"
645 "000110100010000101111000100111011100101011"
646 "001110001100000101111001010011111100101011"
647 "001110011010000011011001001111011001100010"
648 "110110110000111010011001111100001111101001"
649 "001110010011111000101011111101110101100100"
650 "111110111100011110001010001011010010101010"
651 "001111110100111100111110111101110110111000"
652 },
653 /* 13*/ { -1, -1, 5, { 0, 0, "" }, "1", -1, 0, 52, 54, 1, "Version E",
654 "001111100010001000100010001110001000100010001000111000"
655 "001010000100010001000100011000010001000100010001100001"
656 "100010100010001000100010001010001000100010001000101000"
657 "000110000100010001000100011000010001000100010001100001"
658 "100010100010001000100010001010001000100010001000101000"
659 "000110000100010001000100011000010001000100010001100001"
660 "100010100010001000100010001010001000100010001000101000"
661 "000110000100010001000100011000010001000100010001100001"
662 "100010100010001000100010001010001000100010001000101000"
663 "000110000100010001000100011000010001000100010001100001"
664 "100010100010001000100010001010001000100010001000101000"
665 "000110000100010001000100011000010001000100010001100001"
666 "100011100010001000100010001110001000100010001000111000"
667 "000110000100010001000100011000010001000100010001100001"
668 "100010100010001000100010001010001000100010001000101000"
669 "000110000100010001000100011000010001000100010001100001"
670 "100010100010001000100010001010001000100010001000101000"
671 "000110000100010001000100011000010001000100010001100001"
672 "100010100010001000100010001010001000100010001000101000"
673 "000110000100010001000100011000010001000100010001100001"
674 "100010100010001000100010001010001000100010001000101000"
675 "000010000000000000000000001000000000000000000000100000"
676 "111111111111111111111111111111111111111111111111111111"
677 "000000000000000000000000001000000000000000000000000000"
678 "111111111111111111111111111111111111111111111111111111"
679 "000000000000000000000000000000000000000000000000000000"
680 "011111111111111111111111111111111111111111111111111110"
681 "010000000000000000000000000000000000000000000000000010"
682 "011111111111111111111111111111111111111111111111111110"
683 "010000000000000000000000000000000000000000000000000010"
684 "011111111111111111111111111111111111111111111111111110"
685 "000110000100010001000100011000010001000100010001100001"
686 "100010100010001000100010001010001000100010001000101000"
687 "000110000100010001000100011000010001000100010001100001"
688 "100010100010001000100010001010001000100010001000101000"
689 "000110000100010001000100011000010001000100010001100001"
690 "100010100010001000100010001010001000100010001000101000"
691 "000110000100010001000100011000010001000100010001100001"
692 "100010100010001000100010001010001000100010001000101000"
693 "000111000100010001000100011100010001000100010001110001"
694 "100010100011001110101101011001001110100110111010100011"
695 "000110000110110111000001011000110010010101010110100000"
696 "011110101100010100001110011000100001000000000011101111"
697 "101010010111001011101001101001011011111100100001100110"
698 "110010110111001110010010111010101010101111101100101100"
699 "010010111100101001101011101010101101010000110100100000"
700 "100010001111111011100100001010111111011111101010101011"
701 "001110101110001110100000101011001010100011010000101010"
702 "001010111001011111011100011011011000010001110111100110"
703 "101110011000100101111110011000100011001011110111101111"
704 "111110101100111001100001101011110110001010011110100010"
705 "111111001000100010110011011100010011010001110011110110"
706 },
707 /* 14*/ { -1, -1, 6, { 0, 0, "" }, "1", -1, 0, 70, 76, 1, "Version F",
708 "0011111000100010001000100011100010001000100010001110001000100010001000111000"
709 "0010100001000100010001000110000100010001000100011000010001000100010001100001"
710 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
711 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
712 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
713 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
714 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
715 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
716 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
717 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
718 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
719 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
720 "1000111000100010001000100011100010001000100010001110001000100010001000111000"
721 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
722 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
723 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
724 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
725 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
726 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
727 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
728 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
729 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
730 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
731 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
732 "1000111000100010001000100011100010001000100010001110001000100010001000111000"
733 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
734 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
735 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
736 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
737 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
738 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
739 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
740 "0000000000000000000000000010000000000000000000000000000000000000000000100000"
741 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
742 "0000000000000000000000000010000000000000000000000000000000000000000000100000"
743 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
744 "0000000000000000000000000000000000000000000000000000000000000000000000000000"
745 "0111111111111111111111111111111111111111111111111111111111111111111111111110"
746 "0100000000000000000000000000000000000000000000000000000000000000000000000010"
747 "0111111111111111111111111111111111111111111111111111111111111111111111111110"
748 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
749 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
750 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
751 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
752 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
753 "0001110001000100010001000111000100010001000100011100010001000100010001110001"
754 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
755 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
756 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
757 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
758 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
759 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
760 "1000101000100010001000100010100010001000100010001010001000011011111010101001"
761 "0001100001000100010001000110000100010001000100011000010001111011011111101101"
762 "0110101100001000110011100010010001101110011110001010011001110110100001100110"
763 "1111101111011010000010100010111111101100011011101001001010011000000111100001"
764 "1101100110100110101000011010111110101010011000011010001011101010101100100001"
765 "0110111110001001101100001111000011101011100101011101110010001101111001110000"
766 "0100100100010000000011110010110000101001011011011010110100000101010001101110"
767 "1110101011010110011110010010101111000100100011011011011011110111000001101010"
768 "0010101100100000101011100110011110000001100010111000101110111101110110101001"
769 "0000101100111111111101000010111100010110010000011001110100001110101111101101"
770 "1101101011000000110000110110010101111111001000111000010110000010100010100100"
771 "1011100000000011011101000110100110010101001101011001110010010111101101101111"
772 "1010101001010010110010111110000010100100101111001000101111010101011111100100"
773 "0001100001110100110100000110010001101111111011101011110000110100110100100000"
774 "0110101111010001100101000010110001111001111001101011010001001111100001100100"
775 "1111101011000011001010101110000111001100100011011000010110011100100111101001"
776 "0100101101010010100110011010000001101000011011111001011101001000011110100101"
777 "1100111111000110110101110011011001001010010101101111011110000111010100110101"
778 },
779 /* 15*/ { -1, -1, 7, { 0, 0, "" }, "1", -1, 0, 104, 98, 1, "Version G",
780 "00111011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
781 "00100010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
782 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
783 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
784 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
785 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
786 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
787 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
788 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
789 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
790 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
791 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
792 "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
793 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
794 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
795 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
796 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
797 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
798 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
799 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
800 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
801 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
802 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
803 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
804 "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
805 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
806 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
807 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
808 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
809 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
810 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
811 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
812 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
813 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
814 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
815 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
816 "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
817 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
818 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
819 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
820 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
821 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
822 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
823 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
824 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
825 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
826 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
827 "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
828 "00000000000000000000000000010000000000000000000000000000000000000000010000000000000000000000000000"
829 "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
830 "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
831 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
832 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
833 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
834 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
835 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
836 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
837 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
838 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
839 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
840 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
841 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
842 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
843 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
844 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
845 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
846 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
847 "00010011010001000100010001011001000100010001000111000100010001000100011100010001000100010011010001"
848 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
849 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
850 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
851 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
852 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
853 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
854 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
855 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
856 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
857 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
858 "10001010001000100010001000010011110011001100000110110111011101100001110001100110110000100010100010"
859 "00010011010001000100010001111101100110011001111111101110111011010110011110011001000000010011010001"
860 "11110010000000000000111011110011101110011001100110100111000010001000110010100010001000101110101001"
861 "11101010001000100001011001110001100110010110011010011010010101010101010101010110011001101110110001"
862 "10011010011111000100010001110001111111111111000010011101110111111100110000100010010110101010101010"
863 "00010010010010011101110111010100100110011001000110001100110011100100010100010001110111101110101110"
864 "01001110101110111011100110010110011010100011001110001111001101110111010101011101110111010010110011"
865 "00101010101010101001111111110111111110000101010110010100010110011001110011101101110111010010110001"
866 "00110010111001100110011001110001010101010101101010010001000100101000010100010001000101110110110111"
867 "00010010010000111011101110110000100110011001011110111011101110101010110010101010101010011010011001"
868 "11010110110111011110100000010000000011011011101110101100110010001000110001010101010101011010101000"
869 "11111110111111111111010001010001000110000110011010011001011101110111010101010110011001100010110010"
870 "10001010000100110111011101110110100110011001001010011101110111000001110001100110000011111110111111"
871 "00100011101011100110011001011101100110011001101111011101110111100111111011101110110010011011011001"
872 "11110010000000000000101010110010101001111101110110110110100101010101010110100101010101010010101011"
873 "11000010100010001000010100010100010000110101010110010101110001000100010100001110111011100010001110"
874 "10111010110001100010001000110101001100110011100110110011001100010001110001100110010100000010000000"
875 "11101110101110101010101010110110010001000100110110111111111111101100110000100010000101110110110111"
876 "00010010100010001001010010010010001001000110011010011000000101010101010101110001000100010110001000"
877 "01110110010101010110101011110011101111101110111010111001100010001000110001000111011101111010001001"
878 "10001010001000111011101110010100100010001000011110111111111111111101010101010101101001110110110111"
879 "10011010010001101010101010110001011101110111000110110111011101111001010101010101111011011110011101"
880 "10010010010001000101011000110000100011011100110010110011110111011101110100110000000000001110010101"
881 "11111110111111111100010011010011001100000000000010000000001101110111010111111100110011001110010101"
882 "01010110010110111111111111010101011001100110011010000000000000001110010010001000011000100010100010"
883 "01010111011110111111111111111010000100010001111011010001000100000111011011001100100100010011010001"
884 },
885 /* 16*/ { -1, -1, 8, { 0, 0, "" }, "1", -1, 0, 148, 134, 1, "Version H",
886 "00111011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
887 "00100010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
888 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
889 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
890 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
891 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
892 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
893 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
894 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
895 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
896 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
897 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
898 "10001011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
899 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
900 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
901 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
902 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
903 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
904 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
905 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
906 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
907 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
908 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
909 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
910 "10001011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
911 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
912 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
913 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
914 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
915 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
916 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
917 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
918 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
919 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
920 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
921 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
922 "10001011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
923 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
924 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
925 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
926 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
927 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
928 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
929 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
930 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
931 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
932 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
933 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
934 "10001011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
935 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
936 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
937 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
938 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
939 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
940 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
941 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
942 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
943 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
944 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
945 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
946 "10001011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
947 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
948 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
949 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
950 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
951 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
952 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
953 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
954 "00000010000000000000000000100000000000000000001000000000000000000010000000000000000000100000000000000000001000000000000000000010000000"
955 "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
956 "00000000000000000000000000100000000000000000000000000000000000000010000000000000000000000000000000000000001000000000000000000000000000"
957 "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
958 "00000000000000000000000000100000000000000000000000000000000000000010000000000000000000000000000000000000001000000000000000000000000000"
959 "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
960 "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
961 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
962 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
963 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
964 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
965 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
966 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
967 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
968 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
969 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
970 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
971 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
972 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
973 "00010011010001000100010001110001000100010001001101000100010001000111000100010001000100110100010001000100011100010001000100010011010001"
974 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
975 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
976 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
977 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
978 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
979 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
980 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
981 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
982 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
983 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
984 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
985 "00010011010001000100010001110001000100010001001101000100010001000111000100010001000100110100010001000100011100010001000100010011010001"
986 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
987 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
988 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
989 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
990 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
991 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
992 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
993 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
994 "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
995 "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
996 "10001010001000100010001000101000100010001000011010111111111111111110111111111111101010100110011001100110011010011001011011001110001100"
997 "00010011010001000100010001110001000100010001111110110111011101110111110111011101111111110111011101110111011111011101111111111111111111"
998 "11001110001100110000100011100011001100110011001011001100111000100010100010001000100010100001000110011001101001100110011001101110100111"
999 "11111110111111111101101000101000100010001000101000100000101000100010100010001000100010100011111110111011101011101110111011101110000110"
1000 "01110110110111011101110111101000100110011001101001100110011001100110110111011101110111100111011101101000011000010001000100010010010001"
1001 "01100110100110011001100110101110010001000100011000010001000100101010011001100110011001101001100110000001111001110111011101110110110111"
1002 "01101110011101110111011101101101110101101001101001100110011001100110100110101000100010100010001000100010001001101111111111111110111111"
1003 "00010110100110011001100110100110011011100010001010001000100010001010001001101100110011100011001100110011001000110000000000000010000000"
1004 "11111110111010101010101010101010101010101010011010000100010001000110000100010001100010101110111011101110111010111011101010101010101010"
1005 "00000010001110101110111011101011101110111011101001010101010101010110010101010101011100101000100010001000101000100010001101110110110111"
1006 "10101010101010101011000001100001000100010001001001000101000100010010010001000100010001100001000000000000001000000000000000000010111100"
1007 "01110110110111011110010000100000000000000000001000000011101011101110101110111011101110101101011001100110011010011001100110011110100100"
1008 "11001110001100110011001100101100001000100010001010001000100010100110011001100110011001101001100110110110111010111011101110111010111011"
1009 "01000111000100010001000100111011110011001100111100110011001100010011100010001000100010110010001000110111011111011101110111011111011101"
1010 "01000010010001000100010001100001000101010001001001000100010001000110000111100010001000101000100010001000101011001000100010001010001000"
1011 "10111110011101110111011101101101110111000001001001000100010001000110000110100000000000100000000000000000001011001111111111111110111111"
1012 "10001010000010101110111011101011101110111011101001011101110111011110011101110111100000100100010001000100011000010001100010111010111011"
1013 "11111110111111110111011101101101110111011101001000111111111111111110111111111111000101101001100110011001101001100110010000010010010001"
1014 "10111010111011101100101110101110111011101110111010111011110111011110011101110111011101101101101001100110011010011001100110011110011011"
1015 "00010010010001000101110100100100010001000100011000010000111010101010101010101010101010101011111101110111011011011101110111011010110000"
1016 "10111010111011101110111011100000001100110011001011001100110011000010110111011101110111100111011101010101111001110111011101110110110111"
1017 "00000010000000000000000000100000110111011101111001110111011101110110000100010001000100100100010001100110011010011001100110011010011001"
1018 "11110010100010001000100010100010001000110001001001000100010001000110000101100000000000100000000000000000001010100010001000100010100010"
1019 "01010010110011001100110011100011001101010111011011011101110111011110011100100101010101100101010101010101011011101101110111011110011101"
1020 "00100010100100101010101010101010101010101010101001010001000100010010010001000100101100101000100010001000101000100010111100000010000000"
1021 "11011111011111000100010001110001000100010001001101110111011101110111110111011101001101110001000100010001001101000100000101000111000100"
1022 "00000010000000000010100100100100010001000100011000010010111100110010110011001100110011100000101111111111111011111111111111110110010101"
1023 "01000110000100010001101111101111111111111111111011111111101110111010111011101110111011101011110000000000001000000000000000001110010011"
1024 "01010110010101010101010101101111010001000100011000010001000100011010111111111111111111101111111111010001101001100110011001100110100110"
1025 "00110010110011001100110011100100000000000000001000000000000000111110101110111011101110101110111011000011001011001100110011001110001100"
1026 "01010010000000000000000000100000000011000111011011011101110111011110011110011110111011101011101110111011101001101101110111011110011101"
1027 "10101010111011101110111011101011101100011100111000110011001100110010110011001000100010100010001000100010001011010001000100010010010001"
1028 "11011110010001001100110011100011001100110011111010000100010001000110000100010001010001100001000100010001001001000100110101000110000100"
1029 "00010010010110011101110111100111011101110111001010011101110111011110011101110111100111100011001100110011001011001100111100010010010001"
1030 "01000110000100010010100110100110011001100110011010011001100000000010000000000000000000100001101000100010001010001000100010000110101111"
1031 "00010010010001000110110101100101010101010101011001010111000110011010011001100110011001101001001010101010101010101010101010100110010110"
1032 "11111110111111111111111111100101110111011101111001110111011101001010000100010001000100100100010001111001011001010101010101010110010101"
1033 "01100111100110011001100110111101111011101110111110111011101110000111110111011101110111110111011101010001011101010101010101010111010101"
1034 },
1035 /* 17*/ { -1, -1, 9, { 0, 0, "" }, "123456", -1, 0, 8, 11, 1, "Version S-10",
1036 "00011110000"
1037 "11000010001"
1038 "10100011100"
1039 "11000011000"
1040 "00000000000"
1041 "11111111111"
1042 "10000000001"
1043 "10111111101"
1044 },
1045 /* 18*/ { -1, -1, 9, { 0, 0, "" }, "123456789012", -1, 0, 8, 21, 1, "Version S-20",
1046 "000101110111000010010"
1047 "110101100101011000101"
1048 "100000101001110101100"
1049 "010110101001010001000"
1050 "000000000010000000000"
1051 "111111111111111111111"
1052 "100000000000000000001"
1053 "101111111111111111101"
1054 },
1055 /* 19*/ { -1, -1, 9, { 0, 0, "" }, "123456789012345678", -1, 0, 8, 31, 1, "Version S-30",
1056 "0000110111010011100000001111001"
1057 "1110100011011100110110110010111"
1058 "1111100010010100111000011001010"
1059 "1101100000010010010111110001110"
1060 "0000000000000001000000000000000"
1061 "1111111111111111111111111111111"
1062 "1000000000000001000000000000001"
1063 "1011111111111111111111111111101"
1064 },
1065 /* 20*/ { -1, -1, 10, { 0, 0, "" }, "ABCDEFGHIJKLM", -1, 0, 16, 17, 1, "Version T-16",
1066 "11100101111100110"
1067 "01101001010011101"
1068 "00101000001011001"
1069 "01000000011110011"
1070 "10010100010001011"
1071 "10101110001001010"
1072 "00101001001001110"
1073 "01101110011001011"
1074 "01111001001110011"
1075 "10000001001101001"
1076 "00000000100000000"
1077 "11111111111111111"
1078 "10000000000000001"
1079 "10111111111111101"
1080 "10000000000000001"
1081 "10111111111111101"
1082 },
1083 /* 21*/ { -1, -1, 10, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGH", -1, 0, 16, 33, 1, "Version T-32",
1084 "111001011110011010010100001011001"
1085 "011010011001110100100000011110011"
1086 "100110101101101100001110001001110"
1087 "101001100101101000000110110110000"
1088 "100011111010011000101011110000100"
1089 "011000110111000000010001111011001"
1090 "010000111111100101010011010011101"
1091 "010110011111011000010111100011110"
1092 "000110111101100001011011000011000"
1093 "101111100010010000100011100000110"
1094 "000000000000000010000000000000000"
1095 "111111111111111111111111111111111"
1096 "100000000000000010000000000000001"
1097 "101111111111111111111111111111101"
1098 "100000000000000000000000000000001"
1099 "101111111111111111111111111111101"
1100 },
1101 /* 22*/ { -1, -1, 10, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC", -1, 0, 16, 49, 1, "Version T-48",
1102 "1110010111100110001010001010110011001101011011011"
1103 "0110100110011101010000000111100111010011001011010"
1104 "0001110001001110100011110101001100101011110001000"
1105 "0000110110110000011000110011100000010001111010110"
1106 "1100100100001010001111000011111011011111011101111"
1107 "1000101000111101111000000100100110100011011110110"
1108 "0000010001110011111001000001000010101000001001110"
1109 "0000010010111000001000100100111111001101000110011"
1110 "0101010011001000001111000100101010001011010001111"
1111 "1100010001111110010001100010011010010011101100110"
1112 "0000000000000000000000001000000000000000000000000"
1113 "1111111111111111111111111111111111111111111111111"
1114 "1000000000000000000000001000000000000000000000001"
1115 "1011111111111111111111111111111111111111111111101"
1116 "1000000000000000000000001000000000000000000000001"
1117 "1011111111111111111111111111111111111111111111101"
1118 },
1119 /* 23*/ { -1, -1, -1, { 0, 0, "" }, "123456789012", -1, 0, 16, 18, 1, "ASCII double digits",
1120 "100011101010111101"
1121 "111010010010100000"
1122 "110110100010001000"
1123 "110010111000010001"
1124 "100010100011010100"
1125 "000010000000100000"
1126 "111111111111111111"
1127 "000000000000000000"
1128 "011111111111111110"
1129 "010000000000000010"
1130 "011111111111111110"
1131 "000100010100100101"
1132 "011001001110101101"
1133 "011010010010101111"
1134 "010111110100100111"
1135 "100010001101111100"
1136 },
1137 /* 24*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123", -1, 0, 16, 18, 1, "DECIMAL (numeric ending >= 13)",
1138 "111111111111001100"
1139 "000110000110010101"
1140 "100010110111011000"
1141 "000010111100010001"
1142 "100010100011100101"
1143 "000010000000100000"
1144 "111111111111111111"
1145 "000000000000000000"
1146 "011111111111111110"
1147 "010000000000000010"
1148 "011111111111111110"
1149 "000100011011101000"
1150 "110111100101101000"
1151 "011011111110101010"
1152 "011011110100101000"
1153 "010000100100111111"
1154 },
1155 /* 25*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123A", -1, 0, 16, 18, 1, "ASCII (ending not fully numeric)",
1156 "100011101010111101"
1157 "111010010010100000"
1158 "110110100000110100"
1159 "110010111001000010"
1160 "100010100011101100"
1161 "000010000000100000"
1162 "111111111111111111"
1163 "000000000000000000"
1164 "011111111111111110"
1165 "010000000000000010"
1166 "011111111111111110"
1167 "000100010110100100"
1168 "010101000111101010"
1169 "001001000010100110"
1170 "001101100111101010"
1171 "010000000011110011"
1172 },
1173 /* 26*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOS", -1, 0, 16, 18, 1, "2 C40 triplets, C40 at end, buffer empty, switch to ASCII before padding (5)",
1174 "111011100010001000"
1175 "011010000100010001"
1176 "100010111110001000"
1177 "000110111100010001"
1178 "100010100000100111"
1179 "000010000000100000"
1180 "111111111111111111"
1181 "000000000000000000"
1182 "011111111111111110"
1183 "010000000000000010"
1184 "011111111111111110"
1185 "000100010010100000"
1186 "011011101100100111"
1187 "111111101001100010"
1188 "110101010100101011"
1189 "100110001001111001"
1190 },
1191 /* 27*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSG", -1, 0, 16, 18, 1, "2 C40 triplets + C40 singlet, C40 at end, singlet in buffer, switch to ASCII before padding (3)",
1192 "111011100010001000"
1193 "011010000100010001"
1194 "100010111101001000"
1195 "000110111110000001"
1196 "100010100011000101"
1197 "000010000000100000"
1198 "111111111111111111"
1199 "000000000000000000"
1200 "011111111111111110"
1201 "010000000000000010"
1202 "011111111111111110"
1203 "000100011111101011"
1204 "010101100101101111"
1205 "110010101010101010"
1206 "001000000101101010"
1207 "100101111101110001"
1208 },
1209 /* 28*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSGO", -1, 0, 16, 18, 1, "2 C40 triplets + C40 doublet, C40 at end, doublet in buffer, switch to ASCII for doublet (2 pad)",
1210 "111011100010001000"
1211 "011010000100010001"
1212 "100010111101000101"
1213 "000110111110000000"
1214 "100010100010100100"
1215 "000010000000100000"
1216 "111111111111111111"
1217 "000000000000000000"
1218 "011111111111111110"
1219 "010000000000000010"
1220 "011111111111111110"
1221 "000100010000100010"
1222 "010011110001101000"
1223 "101110101100101111"
1224 "110011010011101110"
1225 "010001011100111100"
1226 },
1227 /* 29*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSGOS", -1, 0, 16, 18, 1, "3 C40 triplets, C40 at end, switch to ASCII before padding (3)",
1228 "111011100010001000"
1229 "011010000100010001"
1230 "100010100010001111"
1231 "000110000100011111"
1232 "100010100001110000"
1233 "000010000000100000"
1234 "111111111111111111"
1235 "000000000000000000"
1236 "011111111111111110"
1237 "010000000000000010"
1238 "011111111111111110"
1239 "000100010100100101"
1240 "011101101001100111"
1241 "110000000100101000"
1242 "000011011111101011"
1243 "000011110110110001"
1244 },
1245 /* 30*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSGOSG", -1, 0, 16, 18, 1, "3 C40 triplets + C40 singlet, C40 at end, singlet in buffer, switch to ASCII for singlet (1 pad)",
1246 "111011100010001000"
1247 "011010000100010001"
1248 "100010100010001111"
1249 "000110000100011111"
1250 "010010100000100001"
1251 "000010000000100000"
1252 "111111111111111111"
1253 "000000000000000000"
1254 "011111111111111110"
1255 "010000000000000010"
1256 "011111111111111110"
1257 "100000011011100000"
1258 "001111100101101101"
1259 "000001100100100010"
1260 "101001010011100111"
1261 "101111111001110110"
1262 },
1263 /* 31*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSGOSGO", -1, 0, 16, 18, 1, "3 C40 triplets + C40 doublet, C40 at end, doublet in buffer, switch to ASCII for doublet (0 pad)",
1264 "111011100010001000"
1265 "011010000100010001"
1266 "100010100010001111"
1267 "000110000100011111"
1268 "010010010111000001"
1269 "000010000000100000"
1270 "111111111111111111"
1271 "000000000000000000"
1272 "011111111111111110"
1273 "010000000000000010"
1274 "011111111111111110"
1275 "100000000011101010"
1276 "110111111011100101"
1277 "111101001000101111"
1278 "110000011111100011"
1279 "001001001110111100"
1280 },
1281 /* 32*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSGOSGOS", -1, 0, 16, 18, 1, "4 C40 triplets, C40 at end, empty buffer, switch to ASCII before padding (1)",
1282 "111011100010001000"
1283 "011010000100010001"
1284 "100010100010001000"
1285 "000110000100010001"
1286 "100010111100100001"
1287 "000010000000100000"
1288 "111111111111111111"
1289 "000000000000000000"
1290 "011111111111111110"
1291 "010000000000000010"
1292 "011111111111111110"
1293 "000111111110100010"
1294 "101010100011101010"
1295 "111100000000101011"
1296 "001010101010101001"
1297 "110011100111110100"
1298 },
1299 /* 33*/ { -1, -1, -1, { 0, 0, "" }, ".GOSGOSGOSGOS", -1, 0, 16, 18, 1, "ASCII + 4 C40 triplets, C40 at end, empty buffer, no switch to ASCII as no padding",
1300 "001011111010001000"
1301 "111110011000010001"
1302 "100010100010001000"
1303 "000110000100010001"
1304 "100010100010110100"
1305 "000010000000100000"
1306 "111111111111111111"
1307 "000000000000000000"
1308 "011111111111111110"
1309 "010000000000000010"
1310 "011111111111111110"
1311 "000100010111101010"
1312 "011010010011100110"
1313 "000110111100100111"
1314 "111011101001100000"
1315 "010001000011110110"
1316 },
1317 /* 34*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGHIJ\001K", -1, 0, 16, 18, 1, "4 C40 triplets (last shifted) + singlet, no unlatch, singlet as ASCII, no padding",
1318 "111011010111100110"
1319 "011010100110011101"
1320 "001010100001011000"
1321 "010010000011111111"
1322 "110010010000111101"
1323 "000010000000100000"
1324 "111111111111111111"
1325 "000000000000000000"
1326 "011111111111111110"
1327 "010000000000000010"
1328 "011111111111111110"
1329 "001011001010100001"
1330 "101001001111101001"
1331 "101110101101100110"
1332 "001100001010100011"
1333 "001001000000110110"
1334 },
1335 /* 35*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGHIJK\001", -1, 0, 22, 22, 1, "4 C40 triplets + singlet (shifted), backtrack to 3rd triplet and ASCII encode",
1336 "1110110101111001100010"
1337 "0110101001100111010100"
1338 "1000100101111101000100"
1339 "0000101111111110111100"
1340 "0000101000100010001000"
1341 "0010100001000100010001"
1342 "1000101000100010000000"
1343 "0000100000000000100000"
1344 "1111111111111111111111"
1345 "0000000000000000000000"
1346 "0111111111111111111110"
1347 "0100000000000000000010"
1348 "0111111111111111111110"
1349 "0100000000000000000010"
1350 "0111111111111111111110"
1351 "0001000100010001101001"
1352 "1010111010001011101100"
1353 "0011100100111011101111"
1354 "1001100110000000101001"
1355 "1100001010011100100111"
1356 "0011000011111010101111"
1357 "1111110001000011110110"
1358 },
1359 /* 36*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGH\001I\001", -1, 0, 22, 22, 1, "4 C40 triplets + singlet (shifted), backtrack to 2nd triplet and ASCII encode",
1360 "1110110101111001100010"
1361 "0110101001100111010100"
1362 "1111100100010000000100"
1363 "1111101000100100101010"
1364 "0000101000100010001000"
1365 "0010100001000100010001"
1366 "1000101000100010001010"
1367 "0000100000000000100000"
1368 "1111111111111111111111"
1369 "0000000000000000000000"
1370 "0111111111111111111110"
1371 "0100000000000000000010"
1372 "0111111111111111111110"
1373 "0100000000000000000010"
1374 "0111111111111111111110"
1375 "0001000100010001101011"
1376 "0110001001011110100100"
1377 "0000011100110101101011"
1378 "0100111101001101101110"
1379 "0010001000101001101100"
1380 "1110110010000110101011"
1381 "1001100010111000111111"
1382 },
1383 /* 37*/ { -1, -1, -1, { 0, 0, "" }, "\101\102\103\104\105\106\107\110\200\101\102", -1, 0, 22, 22, 1, "'ABCDEFGH<80>AB' - cte_buffer_transfer with cte_p > 3",
1384 "1110110101111001100010"
1385 "0110101001100111010100"
1386 "1000100100101110001111"
1387 "0000101010101100011111"
1388 "0100100100100010001000"
1389 "0010100011000100010001"
1390 "1000101000100010000110"
1391 "0000100000000000100000"
1392 "1111111111111111111111"
1393 "0000000000000000000000"
1394 "0111111111111111111110"
1395 "0100000000000000000010"
1396 "0111111111111111111110"
1397 "0100000000000000000010"
1398 "0111111111111111111110"
1399 "0001000100010001100101"
1400 "1010111100010110100110"
1401 "1001111110011001100011"
1402 "1101111110111000100101"
1403 "1010110011101001101111"
1404 "0111100000001001101001"
1405 "0101000100001100110110"
1406 },
1407 /* 38*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 22, 22, 1, "7 EDI triplets + doublet, doublet encoded as triplet with Shift 0 pad, no switch to ASCII, no padding",
1408 "1110110101111001100010"
1409 "0110101001100111010100"
1410 "1000100101100110011010"
1411 "0000101111001110100110"
1412 "1101101011000111000100"
1413 "0101101010000011011011"
1414 "1110101000111110011010"
1415 "0000100000000000100000"
1416 "1111111111111111111111"
1417 "0000000000000000000000"
1418 "0111111111111111111110"
1419 "0100000000000000000010"
1420 "0111111111111111111110"
1421 "0100000000000000000010"
1422 "0111111111111111111110"
1423 "0000011000111001101001"
1424 "0110011000110111101101"
1425 "0011100111101100101101"
1426 "1110111011011111101110"
1427 "0011000011001101101000"
1428 "0101100011001011101100"
1429 "0100011100011000110110"
1430 },
1431 /* 39*/ { -1, -1, -1, { 0, 0, "" }, "gosgos", -1, 0, 16, 18, 1, "2 TEXT triplets, TEXT at end, buffer empty, switch to ASCII before padding",
1432 "111011100010001000"
1433 "111110000100010001"
1434 "100010111110001000"
1435 "000110111100010001"
1436 "100010100010011101"
1437 "000010000000100000"
1438 "111111111111111111"
1439 "000000000000000000"
1440 "011111111111111110"
1441 "010000000000000010"
1442 "011111111111111110"
1443 "000100011000101000"
1444 "110001011110101111"
1445 "000001000110100100"
1446 "000011110000100010"
1447 "101100010110111010"
1448 },
1449 /* 40*/ { -1, -1, -1, { 0, 0, "" }, "gosgosg", -1, 0, 16, 18, 1, "2 TEXT triplets + TEXT singlet, TEXT at end, singlet in buffer, switch to ASCII for singlet (3 pads)",
1450 "111011100010001000"
1451 "111110000100010001"
1452 "100010111101101000"
1453 "000110111110000001"
1454 "100010100010000100"
1455 "000010000000100000"
1456 "111111111111111111"
1457 "000000000000000000"
1458 "011111111111111110"
1459 "010000000000000010"
1460 "011111111111111110"
1461 "000100011010100100"
1462 "000110100011100010"
1463 "011000001111100101"
1464 "100100000110100110"
1465 "010101111001110000"
1466 },
1467 /* 41*/ { -1, -1, -1, { 0, 0, "" }, "gosgosgo", -1, 0, 16, 18, 1, "2 TEXT triplets + TEXT doublet, TEXT at end, doublet in buffer, switch to ASCII for doublet, (2 pads)",
1468 "111011100010001000"
1469 "111110000100010001"
1470 "100010111101100111"
1471 "000110111110000000"
1472 "100010100010110111"
1473 "000010000000100000"
1474 "111111111111111111"
1475 "000000000000000000"
1476 "011111111111111110"
1477 "010000000000000010"
1478 "011111111111111110"
1479 "000100011100101000"
1480 "011110111111100101"
1481 "110000110110101111"
1482 "010010000000100110"
1483 "101001101001111111"
1484 },
1485 /* 42*/ { -1, -1, -1, { 0, 0, "" }, ".gosgosgosgos", -1, 0, 16, 18, 1, "ASCII + 4 TEXT triplets, TEXT at end, empty buffer, no switch to ASCII as no padding",
1486 "001011111010001000"
1487 "111110111100010001"
1488 "100010100010001000"
1489 "000110000100010001"
1490 "100010100000011010"
1491 "000010000000100000"
1492 "111111111111111111"
1493 "000000000000000000"
1494 "011111111111111110"
1495 "010000000000000010"
1496 "011111111111111110"
1497 "000100010101101100"
1498 "111000100010101011"
1499 "010110110001101110"
1500 "010110000001101110"
1501 "111001010101110110"
1502 },
1503 /* 43*/ { -1, -1, -1, { 0, 0, "" }, "\015*>", -1, 0, 16, 18, 1, "1 EDI triplet, ASCII mode",
1504 "000011001000111000"
1505 "111010101111110001"
1506 "100010100010001000"
1507 "000110000100010001"
1508 "100010100011101000"
1509 "000010000000100000"
1510 "111111111111111111"
1511 "000000000000000000"
1512 "011111111111111110"
1513 "010000000000000010"
1514 "011111111111111110"
1515 "000100011010100110"
1516 "011111010100100100"
1517 "011000001001100100"
1518 "111000011101100111"
1519 "101001101110111110"
1520 },
1521 /* 44*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015", -1, 0, 16, 18, 1, "1 EDI triplet + singlet, ASCII mode",
1522 "000011001000110000"
1523 "111010101111111110"
1524 "100010100010001000"
1525 "000110000100010001"
1526 "100010100001100100"
1527 "000010000000100000"
1528 "111111111111111111"
1529 "000000000000000000"
1530 "011111111111111110"
1531 "010000000000000010"
1532 "011111111111111110"
1533 "000100011110101100"
1534 "011000011100100011"
1535 "101010110001100011"
1536 "000110111010101011"
1537 "101001000010111001"
1538 },
1539 /* 45*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*", -1, 0, 16, 18, 1, "1 EDI triplet + doublet, ASCII mode",
1540 "000011001000110000"
1541 "111010101111111110"
1542 "001010100010001000"
1543 "101110000100010001"
1544 "100010100001010000"
1545 "000010000000100000"
1546 "111111111111111111"
1547 "000000000000000000"
1548 "011111111111111110"
1549 "010000000000000010"
1550 "011111111111111110"
1551 "000100011011100010"
1552 "111101001110101111"
1553 "101010110001101100"
1554 "101100010011101101"
1555 "000010101011111010"
1556 },
1557 /* 46*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>", -1, 0, 16, 18, 1, "2 EDI triplets, EDI mode",
1558 "111011000000100000"
1559 "111010000010110000"
1560 "001010111110001000"
1561 "101110111100010001"
1562 "100010100011001100"
1563 "000010000000100000"
1564 "111111111111111111"
1565 "000000000000000000"
1566 "011111111111111110"
1567 "010000000000000010"
1568 "011111111111111110"
1569 "000100010110101111"
1570 "100010111100100100"
1571 "000001000000101011"
1572 "111000010111100010"
1573 "110010111011111011"
1574 },
1575 /* 47*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015", -1, 0, 16, 18, 1, "2 EDI triplets + singlet, EDI mode + final ASCII",
1576 "111011000000100000"
1577 "111010000010110000"
1578 "001010111100001000"
1579 "101110111111100001"
1580 "100010100000101110"
1581 "000010000000100000"
1582 "111111111111111111"
1583 "000000000000000000"
1584 "011111111111111110"
1585 "010000000000000010"
1586 "011111111111111110"
1587 "000100010111100011"
1588 "111011011010101001"
1589 "011110010100100101"
1590 "011111001000100110"
1591 "100011100011110000"
1592 },
1593 /* 48*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*", -1, 0, 16, 18, 1, "2 EDI triplets + doublet, EDI + final 2 ASCII",
1594 "111011000000100000"
1595 "111010000010110000"
1596 "001010111100000010"
1597 "101110111111101011"
1598 "100010100000111001"
1599 "000010000000100000"
1600 "111111111111111111"
1601 "000000000000000000"
1602 "011111111111111110"
1603 "010000000000000010"
1604 "011111111111111110"
1605 "000100010110100110"
1606 "000010000001101101"
1607 "001001011010101001"
1608 "101001000000100011"
1609 "100011000010110110"
1610 },
1611 /* 49*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>", -1, 0, 16, 18, 1, "3 EDI triplets, EDI mode",
1612 "111011000000100000"
1613 "111010000010110000"
1614 "001010000000101111"
1615 "101110000010111111"
1616 "100010100011011101"
1617 "000010000000100000"
1618 "111111111111111111"
1619 "000000000000000000"
1620 "011111111111111110"
1621 "010000000000000010"
1622 "011111111111111110"
1623 "000100011110100100"
1624 "100101000000101000"
1625 "110101100111101110"
1626 "110110000011100000"
1627 "110111100010110011"
1628 },
1629 /* 50*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015", -1, 0, 16, 18, 1, "3 EDI triplets + singlet, EDI mode + final ASCII singlet",
1630 "111011000000100000"
1631 "111010000010110000"
1632 "001010000000101111"
1633 "101110000010111111"
1634 "000010100000001001"
1635 "000010000000100000"
1636 "111111111111111111"
1637 "000000000000000000"
1638 "011111111111111110"
1639 "010000000000000010"
1640 "011111111111111110"
1641 "111000011011101000"
1642 "110001100000101111"
1643 "101111100101100001"
1644 "000101100111100111"
1645 "011010010010111010"
1646 },
1647 /* 51*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*>", -1, 0, 16, 18, 1, "4 EDI triplets, EDI mode",
1648 "111011000000100000"
1649 "111010000010110000"
1650 "001010000000100000"
1651 "101110000010110000"
1652 "001010111110000011"
1653 "000010000000100000"
1654 "111111111111111111"
1655 "000000000000000000"
1656 "011111111111111110"
1657 "010000000000000010"
1658 "011111111111111110"
1659 "101111110110100011"
1660 "100100100001101111"
1661 "010001111111101001"
1662 "100000101110101011"
1663 "110001000001111000"
1664 },
1665 /* 52*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*>\015", -1, 0, 16, 18, 1, "4 EDI triplets + singlet, EDI mode + nolatch final ASCII singlet (last data codeword of symbol)",
1666 "111011000000100000"
1667 "111010000010110000"
1668 "001010000000100000"
1669 "101110000010110000"
1670 "001010000011000011"
1671 "000010000000100000"
1672 "111111111111111111"
1673 "000000000000000000"
1674 "011111111111111110"
1675 "010000000000000010"
1676 "011111111111111110"
1677 "101111101001101110"
1678 "111111010000101000"
1679 "000011011011101101"
1680 "010111001011101001"
1681 "101010110001111100"
1682 },
1683 /* 53*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*>\015*", -1, 0, 22, 22, 1, "4 EDI triplets + doublet, EDI mode + final 2 ASCII",
1684 "1110110000001000000010"
1685 "1110100000101100001011"
1686 "0000100010000000101111"
1687 "0000101011000010111111"
1688 "0000100010100010001000"
1689 "1110101011000100010001"
1690 "1000101000100010001010"
1691 "0000100000000000100000"
1692 "1111111111111111111111"
1693 "0000000000000000000000"
1694 "0111111111111111111110"
1695 "0100000000000000000010"
1696 "0111111111111111111110"
1697 "0100000000000000000010"
1698 "0111111111111111111110"
1699 "0001000100010001100001"
1700 "1011100001010010100111"
1701 "1100001100111101100000"
1702 "0110111110101000100011"
1703 "1100011011101100100101"
1704 "0110100100001000101101"
1705 "0010111010100110111000"
1706 },
1707 /* 54*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>a", -1, 0, 16, 18, 1, "2 EDI triplets + ASCII singlet, EDI mode + final ASCII",
1708 "111011000000100000"
1709 "111010000010110000"
1710 "001010111101101000"
1711 "101110111100100001"
1712 "100010100010011001"
1713 "000010000000100000"
1714 "111111111111111111"
1715 "000000000000000000"
1716 "011111111111111110"
1717 "010000000000000010"
1718 "011111111111111110"
1719 "000100011000101111"
1720 "101001011011101001"
1721 "111010111100101011"
1722 "100111010011100101"
1723 "011111111010110101"
1724 },
1725 /* 55*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*>a", -1, 0, 16, 18, 1, "4 EDI triplets + ASCII singlet, EDI mode + final ASCII",
1726 "111011000000100000"
1727 "111010000010110000"
1728 "001010000000100000"
1729 "101110000010110000"
1730 "001010011010001000"
1731 "000010000000100000"
1732 "111111111111111111"
1733 "000000000000000000"
1734 "011111111111111110"
1735 "010000000000000010"
1736 "011111111111111110"
1737 "101100100011100101"
1738 "010111100000100111"
1739 "011011111111100010"
1740 "001110101010100111"
1741 "110100010001110011"
1742 },
1743 /* 56*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*>\015a", -1, 0, 22, 22, 1, "4 EDI triplets + singlet + ASCII, EDI mode + final 2 ASCII",
1744 "1110110000001000000010"
1745 "1110100000101100001011"
1746 "0000100010000000101111"
1747 "0000101011000010111111"
1748 "0000100110100010001000"
1749 "1110100010000100010001"
1750 "1000101000100010000110"
1751 "0000100000000000100000"
1752 "1111111111111111111111"
1753 "0000000000000000000000"
1754 "0111111111111111111110"
1755 "0100000000000000000010"
1756 "0111111111111111111110"
1757 "0100000000000000000010"
1758 "0111111111111111111110"
1759 "0001000100010001101001"
1760 "1100100011001011100000"
1761 "0000100110101010101011"
1762 "0011101011110100100111"
1763 "1001111010011000100000"
1764 "0001110010110111101110"
1765 "1001011011101101111101"
1766 },
1767 /* 57*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*a", -1, 0, 22, 22, 1, "3 EDI triplets + doublet + ASCII, EDI mode + final 3 ASCII",
1768 "1110110000001000000010"
1769 "1110100000101100001011"
1770 "0000100010111100000010"
1771 "0000101011111111101011"
1772 "0110101000100010001000"
1773 "0010100001000100010001"
1774 "1000101000100010000110"
1775 "0000100000000000100000"
1776 "1111111111111111111111"
1777 "0000000000000000000000"
1778 "0111111111111111111110"
1779 "0100000000000000000010"
1780 "0111111111111111111110"
1781 "0100000000000000000010"
1782 "0111111111111111111110"
1783 "0001000100010001101101"
1784 "1111101100010011101010"
1785 "1101101001000001101110"
1786 "0110100011111011101000"
1787 "1100011001100110101011"
1788 "1011110100111010100000"
1789 "0001111010001000110010"
1790 },
1791 /* 58*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>ABC", -1, 0, 16, 18, 1, "3 EDI triplets + 3 alphas (EDI)",
1792 "111011000000100000"
1793 "111010000010110000"
1794 "001010000000100101"
1795 "101110000010111001"
1796 "111010111100100000"
1797 "000010000000100000"
1798 "111111111111111111"
1799 "000000000000000000"
1800 "011111111111111110"
1801 "010000000000000010"
1802 "011111111111111110"
1803 "100111111111100110"
1804 "111001010000100011"
1805 "011001101110101101"
1806 "010011011100100111"
1807 "000001001101111001"
1808 },
1809 /* 59*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>1234567", -1, 0, 22, 22, 1, "3 EDI triplets + 7 digits ending (EDI)",
1810 "1110110000001000000010"
1811 "1110100000101100001011"
1812 "0000100010001000110011"
1813 "0000101011000010000011"
1814 "0111101111001110001000"
1815 "0011101111100000010001"
1816 "1000101000100010000000"
1817 "0000100000000000100000"
1818 "1111111111111111111111"
1819 "0000000000000000000000"
1820 "0111111111111111111110"
1821 "0100000000000000000010"
1822 "0111111111111111111110"
1823 "0100000000000000000010"
1824 "0111111111111111111110"
1825 "0001000100010001100101"
1826 "1011111111111010100100"
1827 "1000111100110000100110"
1828 "0010100010010111101000"
1829 "0101100111000110101001"
1830 "0110011101010010101010"
1831 "0101111011000100110001"
1832 },
1833 /* 60*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>12345678", -1, 0, 22, 22, 1, "3 EDI triplets + 8 digits ending -> DECIMAL",
1834 "1110110000001000000010"
1835 "1110100000101100001011"
1836 "0000100010111110001010"
1837 "0000101011111111100100"
1838 "1011101101100010001000"
1839 "1010100000000100010001"
1840 "1000101000100010001110"
1841 "0000100000000000100000"
1842 "1111111111111111111111"
1843 "0000000000000000000000"
1844 "0111111111111111111110"
1845 "0100000000000000000010"
1846 "0111111111111111111110"
1847 "0100000000000000000010"
1848 "0111111111111111111110"
1849 "0001000100010001101101"
1850 "1101011110111101100011"
1851 "1100101101000111100010"
1852 "1000010100101111100101"
1853 "0110001001101100100110"
1854 "1101100100110011101111"
1855 "1001110001001011110010"
1856 },
1857 /* 61*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>123456789012\015*>", -1, 0, 22, 22, 1, "3 EDI triplets + 12 DECIMAL not ending -> DECIMAL",
1858 "1110110000001000000010"
1859 "1110100000101100001011"
1860 "0000100010111110001010"
1861 "0000101011111111100100"
1862 "1011101101110110000000"
1863 "1010100000110011101110"
1864 "0010100011100010001010"
1865 "0000100000000000100000"
1866 "1111111111111111111111"
1867 "0000000000000000000000"
1868 "0111111111111111111110"
1869 "0100000000000000000010"
1870 "0111111111111111111110"
1871 "0100000000000000000010"
1872 "0111111111111111111110"
1873 "1011111100010001100011"
1874 "0111101001010000100101"
1875 "0010110110010110101010"
1876 "1100111001111011100010"
1877 "1000011000100100101001"
1878 "1110010110011011100001"
1879 "1100100100000011111100"
1880 },
1881 /* 62*/ { -1, -1, -1, { 0, 0, "" }, "123456789012345", -1, 0, 16, 18, 1, "5 DECIMAL triplets, ASCII switch before padding (2)",
1882 "111111111111001100"
1883 "000110000110010101"
1884 "100010110101101111"
1885 "000010010110111111"
1886 "100010100011110010"
1887 "000010000000100000"
1888 "111111111111111111"
1889 "000000000000000000"
1890 "011111111111111110"
1891 "010000000000000010"
1892 "011111111111111110"
1893 "000100010011100010"
1894 "101100110010100101"
1895 "111000001001100010"
1896 "100010110110101011"
1897 "111111011010110001"
1898 },
1899 /* 63*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123456", -1, 0, 16, 18, 1, "5 DECIMAL triplets + singlet, switch to ASCII before padding (2)",
1900 "111111111111001100"
1901 "000110000110010101"
1902 "100010110101101111"
1903 "000010010110110111"
1904 "100010100010100110"
1905 "000010000000100000"
1906 "111111111111111111"
1907 "000000000000000000"
1908 "011111111111111110"
1909 "010000000000000010"
1910 "011111111111111110"
1911 "000100011110100000"
1912 "111011001101101000"
1913 "101011010111101100"
1914 "000101110010100011"
1915 "010101000001110111"
1916 },
1917 /* 64*/ { -1, -1, -1, { 0, 0, "" }, "12345678901234567", -1, 0, 16, 18, 1, "5 DECIMAL triplets + doublet, switch before ASCII encoding of final char, padding (1)",
1918 "111111111111001100"
1919 "000110000110010101"
1920 "100010110101101111"
1921 "000010010110110111"
1922 "001110100011101001"
1923 "000010000000100000"
1924 "111111111111111111"
1925 "000000000000000000"
1926 "011111111111111110"
1927 "010000000000000010"
1928 "011111111111111110"
1929 "100000010101101011"
1930 "101101010000100010"
1931 "011011100001101000"
1932 "011100000111101100"
1933 "100010110100110100"
1934 },
1935 /* 65*/ { -1, -1, -1, { 0, 0, "" }, "123456789012345678", -1, 0, 16, 18, 1, "6 DECIMAL triplets, switch to ASCII, padding (1)",
1936 "111111111111001100"
1937 "000110000110010101"
1938 "100010110101101010"
1939 "000010010110100111"
1940 "111110100000101101"
1941 "000010000000100000"
1942 "111111111111111111"
1943 "000000000000000000"
1944 "011111111111111110"
1945 "010000000000000010"
1946 "011111111111111110"
1947 "110100010010100001"
1948 "010011110101101011"
1949 "100010000011100100"
1950 "101110000010100101"
1951 "011010011110111101"
1952 },
1953 /* 66*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123456789", -1, 0, 16, 18, 1, "6 DECIMAL triplets + singlet, switch before ASCII encoding of singlet, no padding",
1954 "111111111111001100"
1955 "000110000110010101"
1956 "100010110101101010"
1957 "000010010110100111"
1958 "111110001111000011"
1959 "000010000000100000"
1960 "111111111111111111"
1961 "000000000000000000"
1962 "011111111111111110"
1963 "010000000000000010"
1964 "011111111111111110"
1965 "110110100111101001"
1966 "000001010011100011"
1967 "101011011101101100"
1968 "011001101011100100"
1969 "101110111011110000"
1970 },
1971 /* 67*/ { -1, -1, -1, { 0, 0, "" }, "12345678901234567890", -1, 0, 16, 18, 1, "6 DECIMAL triplets + doublet, switch before ASCII 2-digit encoding of doublet, no padding",
1972 "111111111111001100"
1973 "000110000110010101"
1974 "100010110101101010"
1975 "000010010110100111"
1976 "111110110110000111"
1977 "000010000000100000"
1978 "111111111111111111"
1979 "000000000000000000"
1980 "011111111111111110"
1981 "010000000000000010"
1982 "011111111111111110"
1983 "110111000010100101"
1984 "110000010000100111"
1985 "011110101001100011"
1986 "111110100110101101"
1987 "001000111011111111"
1988 },
1989 /* 68*/ { -1, -1, -1, { 0, 0, "" }, "123456789012345678901", -1, 0, 16, 18, 1, "7 DECIMAL triplets, fills to final codeword, no padding",
1990 "111111111111001100"
1991 "000110000110010101"
1992 "100010110101101010"
1993 "000010010110100111"
1994 "111010101111000101"
1995 "000010000000100000"
1996 "111111111111111111"
1997 "000000000000000000"
1998 "011111111111111110"
1999 "010000000000000010"
2000 "011111111111111110"
2001 "000111011011101100"
2002 "000000000110101110"
2003 "001011010101101011"
2004 "111000110101100101"
2005 "110001100000110100"
2006 },
2007 /* 69*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123456789012", -1, 0, 16, 18, 1, "7 DECIMAL triplets + singlet, fills to final codeword, no padding",
2008 "111111111111001100"
2009 "000110000110010101"
2010 "100010110101101010"
2011 "000010010110100111"
2012 "111010100010101100"
2013 "000010000000100000"
2014 "111111111111111111"
2015 "000000000000000000"
2016 "011111111111111110"
2017 "010000000000000010"
2018 "011111111111111110"
2019 "000111011001101110"
2020 "010110011110101111"
2021 "101000010001101000"
2022 "100111000001100000"
2023 "101000001010111101"
2024 },
2025 /* 70*/ { -1, -1, -1, { 0, 0, "" }, "123456789012345678901234567890123678901AB", -1, 0, 28, 32, 1, "DECIMAL + 4 bits ASCII switch",
2026 "11111111111100110010001101110110"
2027 "00011000011001010100000101101010"
2028 "10101011101000101111100111100001"
2029 "01111000011110100000111011101111"
2030 "00101001110001111101000100101000"
2031 "10101011101011111100100011100001"
2032 "10001010001000100010001000101000"
2033 "00011000010001000100010001100001"
2034 "10001010001000100010001000101000"
2035 "00011000010001000100010001100001"
2036 "00001000000000000000000000100000"
2037 "11111111111111111111111111111111"
2038 "00000000000000000000000000100000"
2039 "11111111111111111111111111111111"
2040 "00000000000000000000000000000000"
2041 "01111111111111111111111111111110"
2042 "01000000000000000000000000000010"
2043 "01111111111111111111111111111110"
2044 "10001010001000100010001000101000"
2045 "00011000010001000100010001100001"
2046 "10001010000110111001100000101011"
2047 "00011000011011000011101111101001"
2048 "11111001011001010000010011100010"
2049 "10111001000000011101101001100000"
2050 "10111010100111101101110011101010"
2051 "10011010100110001011101000100101"
2052 "11011010001110110010110100101110"
2053 "01011111010001011011010000110111"
2054 },
2055 /* 71*/ { -1, -1, -1, { 0, 0, "" }, "123456789012345678901234567890123678901234A", -1, 0, 22, 22, 0, "DECIMAL + single ASCII in last 8 bits; BWIPP different encodation TODO: investigate",
2056 "1111111111110011001000"
2057 "0001100001100101010000"
2058 "1101100110101011101000"
2059 "0101101010011100011110"
2060 "1011101110011100010010"
2061 "1000100011101111111010"
2062 "0111100001111001000001"
2063 "0000100000000000100000"
2064 "1111111111111111111111"
2065 "0000000000000000000000"
2066 "0111111111111111111110"
2067 "0100000000000000000010"
2068 "0111111111111111111110"
2069 "0100000000000000000010"
2070 "0111111111111111111110"
2071 "1110100010110010101000"
2072 "0110010011100000100000"
2073 "0100100111101100101110"
2074 "1010101110111110101001"
2075 "1001001001100100101101"
2076 "1111110100001111101111"
2077 "0100010100010000111100"
2078 },
2079 /* 72*/ { -1, -1, 10, { 0, 0, "" }, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", -1, 0, 16, 49, 1, "T-48 90",
2080 "1111111111001100100011011011010101110100010111110"
2081 "0001000110010101000001010101001110001111010000011"
2082 "0111000100011001010100000010110100111000111101000"
2083 "1011111111001100100011010011010101110100010111110"
2084 "0011101111111100110010000110101101010111010001011"
2085 "0111000100011001010100000010110100111000111101000"
2086 "1110011111101101100001000001001100101010010111010"
2087 "0011101111100111100011110011101001101100010110101"
2088 "0011110011111001001110110011010010001001010011011"
2089 "1000100101011101110111000000111110000010001000010"
2090 "0000000000000000000000001000000000000000000000000"
2091 "1111111111111111111111111111111111111111111111111"
2092 "1000000000000000000000001000000000000000000000001"
2093 "1011111111111111111111111111111111111111111111101"
2094 "1000000000000000000000001000000000000000000000001"
2095 "1011111111111111111111111111111111111111111111101"
2096 },
2097 /* 73*/ { -1, -1, 10, { 0, 0, "" }, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", -1, ZINT_ERROR_TOO_LONG, 0, 0, 1, "T-48 89",
2098 ""
2099 },
2100 /* 74*/ { -1, -1, -1, { 0, 0, "" }, "A123456789012345678901A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + ASCII",
2101 "0100111111111111001100"
2102 "0010100001000110010101"
2103 "1000101101011010101110"
2104 "0000100101101001110001"
2105 "1011100100100010001000"
2106 "1111100010000100010001"
2107 "1000101000100010001000"
2108 "0000100000000000100000"
2109 "1111111111111111111111"
2110 "0000000000000000000000"
2111 "0111111111111111111110"
2112 "0100000000000000000010"
2113 "0111111111111111111110"
2114 "0100000000000000000010"
2115 "0111111111111111111110"
2116 "0001000100010001101110"
2117 "0110110011111100100001"
2118 "0100111101011000101001"
2119 "1110011001111101100000"
2120 "0100010001010001101011"
2121 "1010001010001011101101"
2122 "1101101001100001110101"
2123 },
2124 /* 75*/ { -1, -1, -1, { 0, 0, "" }, "A1234567890123456789012A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + singlet + ASCII",
2125 "0100111111111111001100"
2126 "0010100001000110010101"
2127 "1000101101011010101110"
2128 "0000100101101001110001"
2129 "1011100011010010001000"
2130 "1111100011001000010001"
2131 "1000101000100010000000"
2132 "0000100000000000100000"
2133 "1111111111111111111111"
2134 "0000000000000000000000"
2135 "0111111111111111111110"
2136 "0100000000000000000010"
2137 "0111111111111111111110"
2138 "0100000000000000000010"
2139 "0111111111111111111110"
2140 "0001000100010001101000"
2141 "1011001000110010100111"
2142 "0001000000011010100011"
2143 "0100110111001011100110"
2144 "0100110111111110101111"
2145 "0101101010001000100111"
2146 "1110011111011111110100"
2147 },
2148 /* 76*/ { -1, -1, -1, { 0, 0, "" }, "A12345678901234567890123A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + doublet + ASCII",
2149 "0100111111111111001100"
2150 "0010100001000110010101"
2151 "1000101101011010101110"
2152 "0000100101101001110001"
2153 "1011101001010010001000"
2154 "1111101001001000010001"
2155 "1000101000100010001110"
2156 "0000100000000000100000"
2157 "1111111111111111111111"
2158 "0000000000000000000000"
2159 "0111111111111111111110"
2160 "0100000000000000000010"
2161 "0111111111111111111110"
2162 "0100000000000000000010"
2163 "0111111111111111111110"
2164 "0001000100010001101011"
2165 "0100111101100011100011"
2166 "1011010001011001101100"
2167 "0110100100111100100101"
2168 "0000100001000101101101"
2169 "0001111010010111100010"
2170 "0001001001000000110100"
2171 },
2172 /* 77*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGHI123456789012A", -1, 0, 22, 22, 1, "3 C40 triplets + 4 DECIMAL triplets + ASCII 0 padding",
2173 "1110110101111001100010"
2174 "0110101001100111010100"
2175 "1000100101111110001010"
2176 "0000101111111111100100"
2177 "1011101101110110000100"
2178 "1010100000110011100010"
2179 "1000101000100010001001"
2180 "0000100000000000100000"
2181 "1111111111111111111111"
2182 "0000000000000000000000"
2183 "0111111111111111111110"
2184 "0100000000000000000010"
2185 "0111111111111111111110"
2186 "0100000000000000000010"
2187 "0111111111111111111110"
2188 "0001000100010001101001"
2189 "1011001000111110100100"
2190 "0010110001001001101100"
2191 "0101101100110101100011"
2192 "1011000110000101101111"
2193 "0011001101000011100011"
2194 "0100110101010110111011"
2195 },
2196 /* 78*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGHI12345678", -1, 0, 22, 22, 1, "3 C40 triplets + ASCII 2-digits end-of-data",
2197 "1110110101111001100010"
2198 "0110101001100111010100"
2199 "1000100101111110001010"
2200 "0000101111111111100100"
2201 "1011101101100010001000"
2202 "1010100000000100010001"
2203 "1000101000100010001011"
2204 "0000100000000000100000"
2205 "1111111111111111111111"
2206 "0000000000000000000000"
2207 "0111111111111111111110"
2208 "0100000000000000000010"
2209 "0111111111111111111110"
2210 "0100000000000000000010"
2211 "0111111111111111111110"
2212 "0001000100010001101011"
2213 "1100001011100110100001"
2214 "0001001101101111100011"
2215 "1101011100100001100101"
2216 "0001011111001001100101"
2217 "1010111111111110101011"
2218 "1101101100101010110101"
2219 },
2220 /* 79*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGH123456789012345678901A", -1, 0, 22, 22, 1, "2 C40 triplets + doublet + ASCII 2-digits ASCII 0 padding",
2221 "1110110101111001100010"
2222 "0110101001100111010100"
2223 "1000100100111110011010"
2224 "0000101110111110011111"
2225 "1100101101100010011010"
2226 "0101101011001110011111"
2227 "1100101101100001001011"
2228 "0000100000000000100000"
2229 "1111111111111111111111"
2230 "0000000000000000000000"
2231 "0111111111111111111110"
2232 "0100000000000000000010"
2233 "0111111111111111111110"
2234 "0100000000000000000010"
2235 "0111111111111111111110"
2236 "0101101100110010100111"
2237 "0101100110010101101001"
2238 "1011110110000101100001"
2239 "1001100010001101100000"
2240 "1001001001000101100000"
2241 "0010110111111111101111"
2242 "1010010000100000110111"
2243 },
2244 /* 80*/ { -1, -1, -1, { 0, 0, "" }, "\101\102\103\104\105\106\107\110\111\112\113\200", -1, 0, 22, 22, 1, "3 C40 triplets + doublet + extended ASCII - note extended ASCII not encodable in C40 mode",
2245 "1110110101111001100010"
2246 "0110101001100111010100"
2247 "1000100101100110001011"
2248 "0000101111001100101011"
2249 "1000101111100010001000"
2250 "0001101111000100010001"
2251 "1000101000100010000001"
2252 "0000100000000000100000"
2253 "1111111111111111111111"
2254 "0000000000000000000000"
2255 "0111111111111111111110"
2256 "0100000000000000000010"
2257 "0111111111111111111110"
2258 "0100000000000000000010"
2259 "0111111111111111111110"
2260 "0001000100010001101001"
2261 "1001001101110100100010"
2262 "1111100010000001101100"
2263 "0000001011000000100010"
2264 "0010111110100000100000"
2265 "1010000101100100100110"
2266 "0101111100110010110010"
2267 },
2268 /* 81*/ { -1, -1, -1, { 0, 0, "" }, "\200\200", -1, 0, 16, 18, 1, "BYTE",
2269 "111011000010001000"
2270 "011110001000000000"
2271 "100010100010001000"
2272 "000110000100010001"
2273 "100010100000110111"
2274 "000010000000100000"
2275 "111111111111111111"
2276 "000000000000000000"
2277 "011111111111111110"
2278 "010000000000000010"
2279 "011111111111111110"
2280 "000100011100101011"
2281 "001001101101100111"
2282 "001011110000101001"
2283 "010011001011100111"
2284 "110100011101110111"
2285 },
2286 /* 82*/ { -1, -1, -1, { 0, 0, "" }, "\200\200\200\200\200\200\200\200", -1, 0, 16, 18, 1, "BYTE (no padding, byte count 0)",
2287 "111011000010001000"
2288 "011110000000000000"
2289 "100010100010001000"
2290 "000010000000000000"
2291 "100010100010101110"
2292 "000010000000100000"
2293 "111111111111111111"
2294 "000000000000000000"
2295 "011111111111111110"
2296 "010000000000000010"
2297 "011111111111111110"
2298 "000000001111100111"
2299 "110101101010101101"
2300 "000011001111100001"
2301 "111101011011100111"
2302 "101110100100111000"
2303 },
2304 /* 83*/ { -1, -1, -1, { 0, 0, "" }, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063", -1, 0, 70, 76, 1, "249 BYTEs + 13 DECIMAL",
2305 "1110111111100010001000100011100010001000100010001110001000100010001000111000"
2306 "0111101001000000000000000010000000000000000000001000000000000000000000100000"
2307 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2308 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2309 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2310 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2311 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2312 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2313 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2314 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2315 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2316 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2317 "1000111000100010001000100011100010001000100010001110001000100010001000111000"
2318 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2319 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2320 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2321 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2322 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2323 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2324 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2325 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2326 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2327 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2328 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2329 "1000111000100010001000100011100010001000100010001110001000100010001000111000"
2330 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2331 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2332 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2333 "1000101000100010001000100010100010001000100010001010001000111111111100101100"
2334 "0000100000000000000000000010000000000000000000001000000000000100011001100101"
2335 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2336 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
2337 "0000000000000000000000000010000000000000000000000000000000000000000000100000"
2338 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
2339 "0000000000000000000000000010000000000000000000000000000000000000000000100000"
2340 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
2341 "0000000000000000000000000000000000000000000000000000000000000000000000000000"
2342 "0111111111111111111111111111111111111111111111111111111111111111111111111110"
2343 "0100000000000000000000000000000000000000000000000000000000000000000000000010"
2344 "0111111111111111111111111111111111111111111111111111111111111111111111111110"
2345 "1000101101110110001000100010100010001000100010001010001000100010001000101000"
2346 "0000101111000100010001000110000100010001000100011000010001000100010001100001"
2347 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2348 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
2349 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2350 "0001110001000100010001000111000100010001000100011100010001000100010001110001"
2351 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2352 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
2353 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2354 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
2355 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2356 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
2357 "1000101000100010001000100010100010001000100010001010001000000000000111100011"
2358 "0001100001000100010001000110000100010001000100011000010001011011011110101011"
2359 "1101100000111100100110000110000010011011010011001000110100111100000010100110"
2360 "0000100100111111111001000010100000111100001101011011101011111101001111100110"
2361 "0110101100100110110000111110010000101000110001101011010101000100010010100001"
2362 "0101111010111101111000110011000001000111111011101100011100011010010111111110"
2363 "0100101011011100111101100010011101110101001000101000100100000100010010100100"
2364 "0100100011111101111101011110001101010001100011011010001011000000011100100100"
2365 "1110101000101010001110101010010011000001011000001001011001011101010011100101"
2366 "1010101111110111000110011010110101010001111000101010011010100101100100101011"
2367 "1101100111010011110000010010000001101111110111011011101001010001101101100100"
2368 "0011101010101010101100111010110100101000011000001001011000100111011011100001"
2369 "0000100001100100110111010110110010110100000100011000100101111111110101100001"
2370 "1110100010111001100110000110101110000101001110111001010100011110111110100110"
2371 "0110100010111000001101100010011011101101111010111011010100111000101010101101"
2372 "0010100011101011110111110110111001101001100101011000110001000000111100101011"
2373 "0000101101010101000011010110011110110100100111111011100001010010000111100100"
2374 "1101111110001011101100010011101010100111101110111101101000010100111000111001"
2375 },
2376 /* 84*/ { -1, -1, -1, { 0, 0, "" }, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063", -1, 0, 70, 76, 1, "250 BYTEs + 13 DECIMAL",
2377 "1110111111000010001000100011100010001000100010001110001000100010001000111000"
2378 "0111101010000000000000000010000000000000000000001000000000000000000000100000"
2379 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2380 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2381 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2382 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2383 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2384 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2385 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2386 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2387 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2388 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2389 "1000111000100010001000100011100010001000100010001110001000100010001000111000"
2390 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2391 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2392 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2393 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2394 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2395 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2396 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2397 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2398 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2399 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2400 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2401 "1000111000100010001000100011100010001000100010001110001000100010001000111000"
2402 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2403 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2404 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2405 "1000101000100010001000100010100010001000100010001010001000100010001111101111"
2406 "0000100000000000000000000010000000000000000000001000000000000000000001100001"
2407 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
2408 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
2409 "0000000000000000000000000010000000000000000000000000000000000000000000100000"
2410 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
2411 "0000000000000000000000000010000000000000000000000000000000000000000000100000"
2412 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
2413 "0000000000000000000000000000000000000000000000000000000000000000000000000000"
2414 "0111111111111111111111111111111111111111111111111111111111111111111111111110"
2415 "0100000000000000000000000000000000000000000000000000000000000000000000000010"
2416 "0111111111111111111111111111111111111111111111111111111111111111111111111110"
2417 "1100101100100011011101100010100010001000100010001010001000100010001000101000"
2418 "1001100101000011110001000110000100010001000100011000010001000100010001100001"
2419 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2420 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
2421 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2422 "0001110001000100010001000111000100010001000100011100010001000100010001110001"
2423 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2424 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
2425 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2426 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
2427 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
2428 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
2429 "1000101000100010001000100010100010001000100010001010001000100000010101100010"
2430 "0001100001000100010001000110000100010001000100011000010001100011101101100000"
2431 "1010100001101111100000000010010011001010111100011000101010100011100000101000"
2432 "0111101101100100101100101110010111011011000100011000011000100011100011100101"
2433 "1011101000111001101101000110000010100011001011011011100001101111110110100100"
2434 "0100111100000111001011001011110010000001000011011111001001010100111110110011"
2435 "0110100010101111101100111110110100010111010000011000001100110111110110101010"
2436 "1011100010111111000000000110001101000111110011011011110100010011110010101010"
2437 "0101100001110111111101100110010101110000111111001001111110111100000101101001"
2438 "0000100110000111111101000110010110001100010100111000010000001101001111101111"
2439 "0011101111110000010101101110010111001100111101001010010100010011000100100011"
2440 "0001101011000000100111010010010111001110100111101011100100110010111001101100"
2441 "0110100000111010110101100010101100111100111110111000001101001110001111101010"
2442 "1001101111111101101000110110000000100001011110101000110110101111101111101111"
2443 "1111101110000111111010000110101010100000110100101000001101111101110100101000"
2444 "1011100011101001011011001010110001001010111111111011001001101111010110100011"
2445 "1111101101101101100101000110010011000011110001101001001011010001000001100100"
2446 "1110110001110110001100000011110011001110000101001111000111011001010011111110"
2447 },
2448 /* 85*/ { -1, -1, -1, { 0, 0, "" }, "\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063", -1, 0, 104, 98, 1, "21 DECIMAL + 501 BYTEs + 13 DECIMAL",
2449 "11111111111100110010001101011110101011101011111011111100001000100010011010001000100010001011001000"
2450 "00010010011001010100000101110010011100011111011110101100010000000000010000000000000000000010000000"
2451 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2452 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2453 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2454 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2455 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2456 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2457 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2458 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2459 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2460 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2461 "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
2462 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2463 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2464 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2465 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2466 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2467 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2468 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2469 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2470 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2471 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2472 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2473 "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
2474 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2475 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2476 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2477 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2478 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2479 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2480 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2481 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2482 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2483 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2484 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2485 "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
2486 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2487 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2488 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2489 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2490 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2491 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2492 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2493 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2494 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2495 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2496 "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
2497 "00000000000000000000000000010000000000000000000000000000000000000000010000000000000000000000000000"
2498 "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
2499 "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
2500 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
2501 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
2502 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
2503 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
2504 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
2505 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
2506 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
2507 "10001010001000100010001000110000100011111111110010110010001101110110010010001000100010001010001000"
2508 "00000010000000000000000000010000000000010001100110010100001111000100010100010001000100010010010001"
2509 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2510 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2511 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2512 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2513 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2514 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2515 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2516 "00010011010001000100010001011001000100010001000111000100010001000100011100010001000100010011010001"
2517 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2518 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2519 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2520 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2521 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2522 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2523 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2524 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2525 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2526 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2527 "10001010001000100010001000010101111100110001001110010100000010101111110110000111111110100110000011"
2528 "00010011010001000100010001011010001100101100001111001111110110101000111111011111000101101011001001"
2529 "11100110110111110010111110110011111011000100101010110000100011101010110010110111100011100010101000"
2530 "00111110111100010011100011010001010100010101100010111001111100011110010001110010011000011010000000"
2531 "10100110000000001001011110110001001111100100111010001011111010000001110010100010010110000010011110"
2532 "01011010111101101100001000110000111010100100010110010110101101010011110011000001110100110010100101"
2533 "10101110101000001111001100110010001001100110000110101100100011010001010000100101111000010010000000"
2534 "01100110000011111101000100110011010100101100001010000110111010111000010000110101011100010110001011"
2535 "01001010011110111111000101110011000110110111001110101001110110111000110101110010101010111010000010"
2536 "00111110101000000010010100110010001010001000000110100000101110111010010111010101011001000010100001"
2537 "01100110010110010010111011010110101010110000110110011100010001001101110001011100000001100010100010"
2538 "00000110110101100100101101010001110010001101100110000101111101010100010001000100101000010010011010"
2539 "01100110011110101001000101110111001010111111111110101101111101111101010100000010000111101010100010"
2540 "11011011001011110101010000111111110011010111110111011001011000011010011011000001011110001011011010"
2541 "10011010111000000101101111010110110001011101110110010011101001010000010001101100100110111010111011"
2542 "00010010111011011110110110110111011010101101110010010111111101000011110110001110011000001010111010"
2543 "10101010110001111111010101110110000001011011011010100100100011101011110110101101111111001110100000"
2544 "00110010111100010110011101010000101010110110100010001000110111111100110011101111111001001110000101"
2545 "10110110011111110110101010010111111001100000100110010000101010100110010110110000010101101010010011"
2546 "01101110011000001100101000010101111100010110000110011011011111111110010010110001010011011010010100"
2547 "01011110010111000111001101010000010101011000110110111000000100001110010000010011100100101010110001"
2548 "10001110110111000010110010010000011110111011000010001001110010010111110111010001100000011110001101"
2549 "00100010101001000001101111110011101100101011010010011001100001101000110010111111010000011010000000"
2550 "01001010000100010111101011110000010100101101011110011010010011010101010111011111111010000110100000"
2551 "11001110100000010100001001010010000101101110100110101100011011001110010101111001100100110010001101"
2552 "01110011001111110111010101111010111001011100001111011101001011010000011011001100100000101011000101"
2553 },
2554 /* 86*/ { -1, -1, -1, { 0, 0, "" }, "\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063", -1, 0, 104, 98, 1, "21 DECIMAL + 251 BYTEs + 21 DECIMAL + 252 BYTEs 13 DECIMAL",
2555 "11111111111100110010001101011110101011101011111011111100001000100010011010001000100010001011001000"
2556 "00010010011001010100000101110010011100011111011110101000010000000000010000000000000000000010000000"
2557 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2558 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2559 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2560 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2561 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2562 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2563 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2564 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2565 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2566 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2567 "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
2568 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2569 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2570 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2571 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2572 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2573 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2574 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2575 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2576 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2577 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2578 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2579 "11111111111100110010001101011110101011101011111011111100001000100010011010001000100010001011001000"
2580 "00010010011001010100000101110010011100011111011110101000100000000000010000000000000000000010000000"
2581 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2582 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2583 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2584 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2585 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2586 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2587 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2588 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2589 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2590 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2591 "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
2592 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2593 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2594 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2595 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2596 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2597 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2598 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2599 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2600 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2601 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2602 "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
2603 "00000000000000000000000000010000000000000000000000000000000000000000010000000000000000000000000000"
2604 "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
2605 "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
2606 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
2607 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
2608 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
2609 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
2610 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
2611 "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
2612 "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
2613 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2614 "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
2615 "10001110111111110011001000110101110110001000100010100010001000100010010010001000100010001010001000"
2616 "00000010010001100101010000110111000100010001000110000100010001000100010100010001000100010010010001"
2617 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2618 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2619 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2620 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2621 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2622 "00010011010001000100010001011001000100010001000111000100010001000100011100010001000100010011010001"
2623 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2624 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2625 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2626 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2627 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2628 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2629 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2630 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2631 "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
2632 "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
2633 "10001010001000100010001000110011000010101111110110110010100010001101110000110101111001011110011111"
2634 "00010011010001000100010001011001111110010101010111011100110101000111111101011100100000000011100110"
2635 "11001010011011010110001001110100001001000100011010001001011101000111110101001001111100011010010010"
2636 "10000010110001101110010110010001110111011000001110100001000101100100010000011011010000010010011000"
2637 "00010010010011001101011100010100111100011010001010000110000111001010010111011110111100011110110101"
2638 "00000010100100110111111101110000101101010101001110010010110010100100010010111100011011110110001100"
2639 "11010110100100100110010110010101010000010100111110111000110001101101110101000010011101011110000010"
2640 "01100010011111110001001000010110001001011010001110101011100010001011110111111010011100111110010000"
2641 "00101010000111011011000010010111011110110110000010001100110010101111010111000110011110101110000001"
2642 "10000010101000010000100101110001011111110001111110001011111110100110010011001100100110100110001110"
2643 "01000010001011010010101110010011100101000011101110010111101000100100010100011010101110000110010001"
2644 "10000010000001111111101110010100011111101000010010010011101111111001110010100110110010101110101111"
2645 "00110010010111000101110010010101110111000100011010000111001110001001010100111001000000010010101001"
2646 "10011011111110010110100101011011100111100000011111111000100101010111011100000001011100001011011101"
2647 "00010010101111110101101101010001111000011011101010010100001000100101110110110001100111010110101111"
2648 "10110010001011100010101000010010110000110101001010100011111010000101010101001111110000010110000010"
2649 "10001110100001100111011011010100110000011100111110011110000010111011110101100011000001000010011101"
2650 "00010010011011110100110100110001100111101101011110111010111000101010110011100100101001000010000011"
2651 "00011010100000000001011100010111110011110011011010010010001000001011110000110010001000100010010001"
2652 "00011110011101000010010010110010000001011000100010000011110010101001010111001110011110010010101100"
2653 "00111110001100010111011110010111101000000111011010010001101111001101110010110100101010101010001110"
2654 "01100010011111000111101001010111100100110000001110110000100001001001010101100010101001111010011001"
2655 "01100010100000100010000100010000010111111011110010010001111110110110110100110110010001110110010101"
2656 "01010110101110000111010001010011001111110001100110101110101100101101110111100010101111100110000101"
2657 "01101010000000111001110100110111110011111001000110101010111111101011110001100001110101000110111101"
2658 "01111111101011000101001010011010111100011101111011110000111111000110111010011101101111001111011011"
2659 },
2660 /* 87*/ { -1, 3, -1, { 0, 0, "" }, "\351", -1, 0, 16, 18, 1, "é in ISO 8859-1",
2661 "100011010101011000"
2662 "000110110111010010"
2663 "100010100011100110"
2664 "001010010110111010"
2665 "100010100001001010"
2666 "000010000000100000"
2667 "111111111111111111"
2668 "000000000000000000"
2669 "011111111111111110"
2670 "010000000000000010"
2671 "011111111111111110"
2672 "000100010000100101"
2673 "111101010011101001"
2674 "101011100101101010"
2675 "001010011001100100"
2676 "101100110110110101"
2677 },
2678 /* 88*/ { -1, 899, -1, { 0, 0, "" }, "\134\134\351\142\154\134\141\150\134", -1, 0, 28, 32, 1, "<bksh>ébl<bksh>ah<bksh>",
2679 "10001101010101100010001110110101"
2680 "00011011011101001010100101101101"
2681 "01011001010101111001100110100110"
2682 "11011011011101101110100011101101"
2683 "01011001010110011001010101101000"
2684 "11011011010010100111011101100001"
2685 "10001010001000100010001000101000"
2686 "00011000010001000100010001100001"
2687 "10001010001000100010001000101000"
2688 "00011000010001000100010001100001"
2689 "00001000000000000000000000100000"
2690 "11111111111111111111111111111111"
2691 "00000000000000000000000000100000"
2692 "11111111111111111111111111111111"
2693 "00000000000000000000000000000000"
2694 "01111111111111111111111111111110"
2695 "01000000000000000000000000000010"
2696 "01111111111111111111111111111110"
2697 "10001010001000100010001000101000"
2698 "00011000010001000100010001100001"
2699 "10001010000000110100111111101001"
2700 "00011000010100010010010100101010"
2701 "01111000001000111111111111101111"
2702 "01111011010110101000000101100011"
2703 "11111010000111010011000010100010"
2704 "10001000010111011010111000100111"
2705 "11011011010100010100111000101011"
2706 "11011110101110100011111110110011"
2707 },
2708 /* 89*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[90]12[91]1234567890123A", -1, 0, 22, 22, 1, "Step B4",
2709 "1110111101100011101110"
2710 "1000101100111011000100"
2711 "0000101011111001110001"
2712 "1110101000001110111111"
2713 "0011100100100010001000"
2714 "1111100010000100010001"
2715 "1000101000100010000111"
2716 "0000100000000000100000"
2717 "1111111111111111111111"
2718 "0000000000000000000000"
2719 "0111111111111111111110"
2720 "0100000000000000000010"
2721 "0111111111111111111110"
2722 "0100000000000000000010"
2723 "0111111111111111111110"
2724 "0001000100010001100001"
2725 "1001100110011111101011"
2726 "1000101110111110100010"
2727 "0010010011111111100100"
2728 "1110011100011111101010"
2729 "0100001001100001101110"
2730 "1110110100001101111001"
2731 },
2732 /* 90*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[90]12[91]12345", -1, 0, 16, 18, 1, "Step B5",
2733 "111011110110001110"
2734 "100010110011101100"
2735 "111010000010111101"
2736 "010010111011111001"
2737 "100010100000001010"
2738 "000010000000100000"
2739 "111111111111111111"
2740 "000000000000000000"
2741 "011111111111111110"
2742 "010000000000000010"
2743 "011111111111111110"
2744 "000100011001101110"
2745 "101011011100101110"
2746 "111100010101100000"
2747 "011100010001100101"
2748 "101000101000110110"
2749 },
2750 /* 91*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[10]AB[90]ABCDEFGHIJKLMNOP[91]ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 28, 32, 1, "Step P",
2751 "11101110000100010011101101111110"
2752 "10001011000010001110001100100110"
2753 "01011011100110001010000101101001"
2754 "10011010011101010000001111100011"
2755 "10011010101101101110000101100001"
2756 "10101001100101010101000010100111"
2757 "01101001010111100010001100101001"
2758 "00001000100011110101101000101010"
2759 "00001010100011110001111101101011"
2760 "00111011011110000010010011100100"
2761 "00001000000000000000000000100000"
2762 "11111111111111111111111111111111"
2763 "00000000000000000000000000100000"
2764 "11111111111111111111111111111111"
2765 "00000000000000000000000000000000"
2766 "01111111111111111111111111111110"
2767 "01000000000000000000000000000010"
2768 "01111111111111111111111111111110"
2769 "11101011101111010110001000101000"
2770 "01101011111111101100010001100001"
2771 "10001010000010110100001000100011"
2772 "00011000011100110001011011100011"
2773 "11001011010100110100000101100011"
2774 "10111000010010101001100000100100"
2775 "01101001000001010101110001100011"
2776 "00011011010110111001110010100100"
2777 "01111000010000110101101110100100"
2778 "00011110111111111110101011110110"
2779 },
2780 /* 92*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[11]121212", -1, 0, 16, 18, 1, "Start FNC1 and Decimal",
2781 "111011000100000101"
2782 "110010110011011111"
2783 "110010001110001000"
2784 "100110001100010001"
2785 "100010100001011101"
2786 "000010000000100000"
2787 "111111111111111111"
2788 "000000000000000000"
2789 "011111111111111110"
2790 "010000000000000010"
2791 "011111111111111110"
2792 "000100010100101010"
2793 "101010101001100101"
2794 "110011110100100111"
2795 "000111100011101101"
2796 "100101110101111101"
2797 },
2798 /* 93*/ { -1, -1, 1, { 1, 15, "" }, "ABCDEFGHIJ", -1, 0, 16, 18, 1, "Structured Append (Group mode) 1st symbol, no ECI",
2799 "000011111011100101"
2800 "111010100101101001"
2801 "111010011000101000"
2802 "100110110101000000"
2803 "010110010011010000"
2804 "000010000000100000"
2805 "111111111111111111"
2806 "000000000000000000"
2807 "011111111111111110"
2808 "010000000000000010"
2809 "011111111111111110"
2810 "111110111110100100"
2811 "000001000110100000"
2812 "011011101111100000"
2813 "010110110000100111"
2814 "101110110100110101"
2815 },
2816 /* 94*/ { -1, -1, 1, { 2, 15, "" }, "KLMNOPQRST", -1, 0, 16, 18, 1, "Structured Append (Group mode) subsequent symbol, no ECI",
2817 "000111111011101001"
2818 "110110100101101010"
2819 "000010101000111100"
2820 "001110110111100000"
2821 "011110010101010101"
2822 "000010000000100000"
2823 "111111111111111111"
2824 "000000000000000000"
2825 "011111111111111110"
2826 "010000000000000010"
2827 "011111111111111110"
2828 "100101010000100101"
2829 "100010011111100000"
2830 "001110111110101011"
2831 "010101010000100001"
2832 "110100011010111010"
2833 },
2834 /* 95*/ { -1, 3, 1, { 1, 15, "" }, "AB", -1, 0, 16, 18, 1, "Structured Append (Group mode) 1st symbol, with ECI",
2835 "100011111000000101"
2836 "000110100111101101"
2837 "010110100010001000"
2838 "110110001000100101"
2839 "010010010010101011"
2840 "000010000000100000"
2841 "111111111111111111"
2842 "000000000000000000"
2843 "011111111111111110"
2844 "010000000000000010"
2845 "011111111111111110"
2846 "001000110101100110"
2847 "110100010011101110"
2848 "010010010011100011"
2849 "100001000010100000"
2850 "000110111011111101"
2851 },
2852 /* 96*/ { -1, 3, 1, { 2, 15, "" }, "CDEF", -1, 0, 16, 18, 1, "Structured Append (Group mode) subsequent symbol, with ECI",
2853 "000111111001011000"
2854 "110110100111010010"
2855 "100010100001000100"
2856 "001010010101000101"
2857 "010010010000110111"
2858 "000010000000100000"
2859 "111111111111111111"
2860 "000000000000000000"
2861 "011111111111111110"
2862 "010000000000000010"
2863 "011111111111111110"
2864 "011001111110101000"
2865 "101101010111100000"
2866 "111001110100100111"
2867 "010010010100100110"
2868 "000100100101110110"
2869 },
2870 /* 97*/ { -1, -1, 1, { 128, 128, "" }, "ABCDEFGHI", -1, 0, 16, 18, 1, "Structured Append (Extended Group mode)",
2871 "100011100011101110"
2872 "000010000010010110"
2873 "010110111001100010"
2874 "100110100111010100"
2875 "100010010111101110"
2876 "000010000000100000"
2877 "111111111111111111"
2878 "000000000000000000"
2879 "011111111111111110"
2880 "010000000000000010"
2881 "011111111111111110"
2882 "000011111001100010"
2883 "111110000001101110"
2884 "011011001000101010"
2885 "000001010100101011"
2886 "110100001010111101"
2887 },
2888 };
2889 const int data_size = ARRAY_SIZE(data);
2890 int i, length, ret;
2891 struct zint_symbol *symbol = NULL;
2892
2893 char escaped[8192];
2894 char bwipp_buf[32768];
2895 char bwipp_msg[1024];
2896
2897 int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
2898
2899 testStartSymbol("test_encode", &symbol);
2900
2901 for (i = 0; i < data_size; i++) {
2902
2903 if (testContinue(p_ctx, i)) continue;
2904
2905 symbol = ZBarcode_Create();
2906 assert_nonnull(symbol, "Symbol not created\n");
2907
2908 length = testUtilSetSymbol(symbol, BARCODE_CODEONE, data[i].input_mode, data[i].eci, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
2909 if (data[i].structapp.count) {
2910 symbol->structapp = data[i].structapp;
2911 }
2912
2913 ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
2914 assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
2915
2916 if (p_ctx->generate) {
2917 printf(" /*%3d*/ { %s, %d, %d, { %d, %d, \"%s\" }, \"%s\", %d, %s, %d, %d, %d, \"%s\",\n",
2918 i, testUtilInputModeName(data[i].input_mode), data[i].eci, data[i].option_2,
2919 data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
2920 testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), data[i].length,
2921 testUtilErrorName(data[i].ret), symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
2922 if (ret < ZINT_ERROR) {
2923 testUtilModulesPrint(symbol, " ", "\n");
2924 } else {
2925 printf(" \"\"\n");
2926 }
2927 printf(" },\n");
2928 } else {
2929 if (ret < ZINT_ERROR) {
2930 int width, row;
2931
2932 assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n",
2933 i, symbol->rows, data[i].expected_rows, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)));
2934 assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n",
2935 i, symbol->width, data[i].expected_width, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)));
2936
2937 ret = testUtilModulesCmp(symbol, data[i].expected, &width, &row);
2938 assert_zero(ret, "i:%d testUtilModulesCmp ret %d != 0 width %d row %d (%s)\n",
2939 i, ret, width, row, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)));
2940
2941 if (do_bwipp && testUtilCanBwipp(i, symbol, -1, data[i].option_2, -1, debug)) {
2942 if (!data[i].bwipp_cmp) {
2943 if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
2944 } else {
2945 ret = testUtilBwipp(i, symbol, -1, data[i].option_2, -1, data[i].data, length, NULL, bwipp_buf, sizeof(bwipp_buf), NULL);
2946 assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
2947
2948 ret = testUtilBwippCmp(symbol, bwipp_msg, bwipp_buf, data[i].expected);
2949 assert_zero(ret, "i:%d %s testUtilBwippCmp %d != 0 %s\n actual: %s\nexpected: %s\n",
2950 i, testUtilBarcodeName(symbol->symbology), ret, bwipp_msg, bwipp_buf, data[i].expected);
2951 }
2952 }
2953 }
2954 }
2955
2956 ZBarcode_Delete(symbol);
2957 }
2958
2959 testFinish();
2960 }
2961
2962 static void test_encode_segs(const testCtx *const p_ctx) {
2963 int debug = p_ctx->debug;
2964
2965 struct item {
2966 int input_mode;
2967 int option_2;
2968 struct zint_structapp structapp;
2969 struct zint_seg segs[3];
2970 int ret;
2971
2972 int expected_rows;
2973 int expected_width;
2974 int bwipp_cmp;
2975 char *comment;
2976 char *expected;
2977 };
2978 /* Figure examples AIM USS Code One (USSCO) Revision March 3, 2000 */
2979 static const struct item data[] = {
2980 /* 0*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("¶"), -1, 0 }, { TU("Ж"), -1, 7 }, { TU(""), 0, 0 } }, 0, 16, 18, 1, "Standard example",
2981 "100011010111100011"
2982 "000110110110110111"
2983 "010110100010001000"
2984 "110110001000101001"
2985 "111010001111111011"
2986 "000010000000100000"
2987 "111111111111111111"
2988 "000000000000000000"
2989 "011111111111111110"
2990 "010000000000000010"
2991 "011111111111111110"
2992 "101101111011100110"
2993 "100001001111100110"
2994 "010110111000101011"
2995 "001010010011101001"
2996 "010100101110110001"
2997 },
2998 /* 1*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("¶"), -1, 0 }, { TU("Ж"), -1, 0 }, { TU(""), 0, 0 } }, ZINT_WARN_USES_ECI, 16, 18, 1, "Standard example auto-ECI",
2999 "100011010111100011"
3000 "000110110110110111"
3001 "010110100010001000"
3002 "110110001000101001"
3003 "111010001111111011"
3004 "000010000000100000"
3005 "111111111111111111"
3006 "000000000000000000"
3007 "011111111111111110"
3008 "010000000000000010"
3009 "011111111111111110"
3010 "101101111011100110"
3011 "100001001111100110"
3012 "010110111000101011"
3013 "001010010011101001"
3014 "010100101110110001"
3015 },
3016 /* 2*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("Ж"), -1, 7 }, { TU("¶"), -1, 0 }, { TU(""), 0, 0 } }, 0, 22, 22, 1, "Standard example inverted",
3017 "1000110101010110001000"
3018 "0001101101110100100010"
3019 "1000101110001101011000"
3020 "1001101011011111010010"
3021 "1000101000111000111000"
3022 "0010100101101101110001"
3023 "1000101000100010001101"
3024 "0000100000000000100000"
3025 "1111111111111111111111"
3026 "0000000000000000000000"
3027 "0111111111111111111110"
3028 "0100000000000000000010"
3029 "0111111111111111111110"
3030 "0100000000000000000010"
3031 "0111111111111111111110"
3032 "0001000100010001101111"
3033 "1010110111011111100100"
3034 "1100011010110110101000"
3035 "1111001110101001101101"
3036 "1011101010111001100100"
3037 "0010011101100011101011"
3038 "0011010111000001111101"
3039 },
3040 /* 3*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("Ж"), -1, 0 }, { TU("¶"), -1, 0 }, { TU(""), 0, 0 } }, ZINT_WARN_USES_ECI, 22, 22, 1, "Standard example inverted auto-ECI",
3041 "1000110101010110001000"
3042 "0001101101110100100010"
3043 "1000101110001101011000"
3044 "1001101011011111010010"
3045 "1000101000111000111000"
3046 "0010100101101101110001"
3047 "1000101000100010001101"
3048 "0000100000000000100000"
3049 "1111111111111111111111"
3050 "0000000000000000000000"
3051 "0111111111111111111110"
3052 "0100000000000000000010"
3053 "0111111111111111111110"
3054 "0100000000000000000010"
3055 "0111111111111111111110"
3056 "0001000100010001101111"
3057 "1010110111011111100100"
3058 "1100011010110110101000"
3059 "1111001110101001101101"
3060 "1011101010111001100100"
3061 "0010011101100011101011"
3062 "0011010111000001111101"
3063 },
3064 /* 4*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("product:Google Pixel 4a - 128 GB of Storage - Black;price:$439.97"), -1, 3 }, { TU("品名:Google 谷歌 Pixel 4a -128 GB的存储空间-黑色;零售价:¥3149.79"), -1, 29 }, { TU("Produkt:Google Pixel 4a - 128 GB Speicher - Schwarz;Preis:444,90 €"), -1, 17 } }, 0, 70, 76, 0, "AIM ITS/04-023:2022 Annex A example; BWIPP different encodation",
3065 "1000110101010110001000100011111010110011011010101111000111000010111011110011"
3066 "0001101101110100100010010110111110100101111100011011101000110101010010101010"
3067 "0111101111011010010111011010001100110000001000101000110001000100001101101011"
3068 "0000101011011101100100110010010001001000010000001011010011100011000100100001"
3069 "1111100000100110111110011110110100000010000011101001010001000011011100100100"
3070 "1100101111101000110111111110010010000100110010101010101001100011100101100001"
3071 "0111101011111100101010001110001011100101100010001010011110001111001011101100"
3072 "0000101000111101011101101010111100111101001000101011110111101001100111100011"
3073 "1111100011010001100110011010011001100010101111001010111110001001010110100111"
3074 "1011101010011111111111011110110001010000100110001010001000000000001001101000"
3075 "0110100110001000110110001010001000110011001100101001000100101111001011101110"
3076 "0101101100000001000001000010110100010010100000001001110010010101000100100110"
3077 "1011111010101111011011111011001010111101110010101100111100111011001101111011"
3078 "0100100010111101011100010010110110101010100110111010110001001110101011101100"
3079 "1101100011101010101010101110001011010101100010001010010101111011000011101101"
3080 "1011101010001101000001001110111100011101001000101000110001111101100010101000"
3081 "0110100000100100110011100010111100010010100001011010011100010111110100100111"
3082 "0010101000101100001101000010101100110001111110111011000001011110101011101110"
3083 "0010100110000010010000111110011101011000000101111001010000001000001000101000"
3084 "0111100100110110111100101110101110111100011001011011001000010011111001101000"
3085 "1110101100110101100110110010101011000011111110101000110010110100101110100010"
3086 "1111100111101001000001010010011110001000111111101001011101110000011011100101"
3087 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
3088 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
3089 "1000111000100010001000100011100010001000100010001110001000100010001000111000"
3090 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
3091 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
3092 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
3093 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
3094 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
3095 "0000100000000000000000000010000000000000000000001000000000000000000000100000"
3096 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
3097 "0000000000000000000000000010000000000000000000000000000000000000000000100000"
3098 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
3099 "0000000000000000000000000010000000000000000000000000000000000000000000100000"
3100 "1111111111111111111111111111111111111111111111111111111111111111111111111111"
3101 "0000000000000000000000000000000000000000000000000000000000000000000000000000"
3102 "0111111111111111111111111111111111111111111111111111111111111111111111111110"
3103 "0100000000000000000000000000000000000000000000000000000000000000000000000010"
3104 "0111111111111111111111111111111111111111111111111111111111111111111111111110"
3105 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
3106 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
3107 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
3108 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
3109 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
3110 "0001110001000100010001000111000100010001000100011100010001000100010001110001"
3111 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
3112 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
3113 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
3114 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
3115 "1000101000100010001000100010100010001000100010001010001000100010001000101000"
3116 "0001100001000100010001000110000100010001000100011000010001000100010001100001"
3117 "1000101000100010001000100010100010001000100010001010001000111001101111100110"
3118 "0001100001000100010001000110000100010001000100011000010001000110100010100101"
3119 "0101101000101000110010110110001110100100110101001000001100000010011101100010"
3120 "0100101100111011100101111110111100100011111000111010110101000110001000100111"
3121 "1011100010000010011110111110111011110111001100111000101011101100001101100001"
3122 "0011111101010101000010110011010000101111001101011101101100000011001101111110"
3123 "1001101110000000010100100110001000011000010000001001100010100101011001100000"
3124 "1010100110110100010001001110110010011100001101001000000010100010111111100101"
3125 "0001101110111011011001101110001100010010110101111000101011101001111000100000"
3126 "0100100011110110101101100110010110110100101011001011011000011001000111100011"
3127 "1010101111011001001000100110010011010011110100101010010111000101001001100110"
3128 "1011100010101101111110010010001011100010010101111001001111010100011111100001"
3129 "0110101001011011001101100110110001100100010000101011010010101001110100100110"
3130 "1101101000100011101100101110100110011111100111111001010100100101111101100010"
3131 "1100100010111011001011100010100100011110001000101011000010100011101011101111"
3132 "1110100101000010010101100010010111010111001110011010010101111110100000100011"
3133 "0110101011010011001101110110100011011101001011011001000100000001110011101110"
3134 "1110110001111000110010010111100110011010101100011101011011100000011001110111"
3135 },
3136 /* 5*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("price:$439.97"), -1, 3 }, { TU("零售价:¥3149.79"), -1, 29 }, { TU("Preis:444,90 €"), -1, 17 } }, 0, 40, 42, 1, "AIM ITS/04-023:2022 Annex A example price only",
3137 "100011010101011000101100100001110111110110"
3138 "000110110111010010001010010100010011101010"
3139 "011010011000110010101010001100101110100101"
3140 "010010011010110101111001101011110011101101"
3141 "100010100010011110001000110011101100101101"
3142 "001010001011110111101001000100111010101011"
3143 "101110110100111010101010101010110010101101"
3144 "110010101110100011011000000100111111100001"
3145 "010110100010001001011001011101100110100111"
3146 "110110001000100011001001001101101010100100"
3147 "001110101000110010111001001011100010101000"
3148 "101110111001011101111000000110110101100001"
3149 "100011100010001000101100100010001000111000"
3150 "000110000100010001001001000100010001100001"
3151 "100010100010001000101000100010001000101000"
3152 "000010000000000000001000000000000000100000"
3153 "111111111111111111111111111111111111111111"
3154 "000000000000000000000000000000000000000000"
3155 "011111111111111111111111111111111111111110"
3156 "010000000000000000000000000000000000000010"
3157 "011111111111111111111111111111111111111110"
3158 "010000000000000000000000000000000000000010"
3159 "011111111111111111111111111111111111111110"
3160 "010000000000000000000000000000000000000010"
3161 "011111111111111111111111111111111111111110"
3162 "000110000100010001001001000100010001100001"
3163 "100010100010001000101000100010001000101000"
3164 "000111000100010001001101000100010001110001"
3165 "100010100010001000101000100010001000101000"
3166 "000110000100010001001001000100010001100001"
3167 "100010101101011000011000010110000000101110"
3168 "000110111010101011001011011010010011100010"
3169 "100010000110000101101011111101110001100010"
3170 "010110010000111010111000101011000010101010"
3171 "111010111101001011001010101000001111100000"
3172 "011110101101000001001001011001010000100111"
3173 "110110011011111111111000000001111100101100"
3174 "110110001001101110101011000011000000101111"
3175 "100110111001001100101001010010001011100111"
3176 "111011100100101100101111011011100100111101"
3177 },
3178 /* 6*/ { DATA_MODE, -1, { 0, 0, "" }, { { TU("\266"), 1, 0 }, { TU("\266"), 1, 7 }, { TU("\266"), 1, 0 } }, 0, 22, 22, 1, "Standard example + extra seg, data mode",
3179 "1000110101111000110101"
3180 "0001101101101101111101"
3181 "1000101000100011100011"
3182 "0010100010100110110111"
3183 "0101101000100010001110"
3184 "1101100010001001011011"
3185 "0011101000100010000010"
3186 "0000100000000000100000"
3187 "1111111111111111111111"
3188 "0000000000000000000000"
3189 "0111111111111111111110"
3190 "0100000000000000000010"
3191 "0111111111111111111110"
3192 "0100000000000000000010"
3193 "0111111111111111111110"
3194 "0111000100010001100011"
3195 "1100010110011101101111"
3196 "1100000111010111101001"
3197 "0010000001001111101110"
3198 "1100100101010100100110"
3199 "1110101101100111101011"
3200 "1001101001111010111100"
3201 },
3202 /* 7*/ { UNICODE_MODE, -1, { 1, 15, "" }, { { TU("A"), -1, 3 }, { TU("B"), -1, 4 }, { TU("C"), -1, 5 } }, 0, 22, 22, 1, "Structured Append (Group mode) 1st symbol, with ECI",
3203 "1000111110000001010101"
3204 "0001101001111011011101"
3205 "1000101000100001000101"
3206 "0010100010010100101101"
3207 "1000101000100001000101"
3208 "0010100010011000111101"
3209 "1000101000100001000111"
3210 "0000100000000000100000"
3211 "1111111111111111111111"
3212 "0000000000000000000000"
3213 "0111111111111111111110"
3214 "0100000000000000000010"
3215 "0111111111111111111110"
3216 "0100000000000000000010"
3217 "0111111111111111111110"
3218 "0010001001110100100100"
3219 "0010010011001111101011"
3220 "1101000100011110101010"
3221 "0000000001000101101000"
3222 "1101010110111101101011"
3223 "0011010110111100101011"
3224 "1111101011110000110101"
3225 },
3226 /* 8*/ { UNICODE_MODE, -1, { 3, 15, "" }, { { TU("A"), -1, 3 }, { TU("B"), -1, 4 }, { TU("C"), -1, 5 } }, 0, 22, 22, 1, "Structured Append (Group mode) subsequent symbol, with ECI",
3227 "0010111110010110001000"
3228 "1100101001110100100010"
3229 "1000100100010110001000"
3230 "0101100010110100100010"
3231 "1000100100010110001000"
3232 "0110100011110100100010"
3233 "1000100100100010001100"
3234 "0000100000000000100000"
3235 "1111111111111111111111"
3236 "0000000000000000000000"
3237 "0111111111111111111110"
3238 "0100000000000000000010"
3239 "0111111111111111111110"
3240 "0100000000000000000010"
3241 "0111111111111111111110"
3242 "0111010000010001101101"
3243 "0001110000100010101101"
3244 "0101011110011000101110"
3245 "1111110110000110100111"
3246 "0100001100101001100010"
3247 "1111010111000111100011"
3248 "0010100111110110110101"
3249 },
3250 /* 9*/ { UNICODE_MODE, -1, { 128, 128, "" }, { { TU("A"), -1, 3 }, { TU("B"), -1, 4 }, { TU("C"), -1, 5 } }, 0, 22, 22, 1, "Structured Append (Extended Group mode)",
3251 "1000111000111001011000"
3252 "0000100000100111010010"
3253 "1000101000010001011000"
3254 "0010100101001011010010"
3255 "1000101000010001011000"
3256 "0010100110001111010010"
3257 "1000101000010010000001"
3258 "0000100000000000100000"
3259 "1111111111111111111111"
3260 "0000000000000000000000"
3261 "0111111111111111111110"
3262 "0100000000000000000010"
3263 "0111111111111111111110"
3264 "0100000000000000000010"
3265 "0111111111111111111110"
3266 "0010011101000001101001"
3267 "1111101010101110101001"
3268 "0111011000100101100010"
3269 "1111010000001010101101"
3270 "0010001100101010101111"
3271 "0000110101011010101000"
3272 "0110000110100100110110"
3273 },
3274 /* 10*/ { UNICODE_MODE, 9, { 0, 0, "" }, { { TU("A"), -1, 3 }, { TU("B"), -1, 4 }, { TU("C"), -1, 5 } }, ZINT_ERROR_INVALID_OPTION, 0, 0, 1, "Multiple segments not suppoted for Version S",
3275 ""
3276 },
3277 };
3278 const int data_size = ARRAY_SIZE(data);
3279 int i, j, seg_count, ret;
3280 struct zint_symbol *symbol = NULL;
3281
3282 char escaped[8192];
3283 char bwipp_buf[32768];
3284 char bwipp_msg[1024];
3285
3286 int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
3287
3288 testStartSymbol("test_encode_segs", &symbol);
3289
3290 for (i = 0; i < data_size; i++) {
3291
3292 if (testContinue(p_ctx, i)) continue;
3293
3294 symbol = ZBarcode_Create();
3295 assert_nonnull(symbol, "Symbol not created\n");
3296
3297 testUtilSetSymbol(symbol, BARCODE_CODEONE, data[i].input_mode, -1 /*eci*/,
3298 -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/,
3299 NULL, 0, debug);
3300 if (data[i].structapp.count) {
3301 symbol->structapp = data[i].structapp;
3302 }
3303 for (j = 0, seg_count = 0; j < 3 && data[i].segs[j].length; j++, seg_count++);
3304
3305 ret = ZBarcode_Encode_Segs(symbol, data[i].segs, seg_count);
3306 assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode_Segs ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
3307
3308 if (p_ctx->generate) {
3309 char escaped1[4096];
3310 char escaped2[4096];
3311 int length = data[i].segs[0].length == -1 ? (int) ustrlen(data[i].segs[0].source) : data[i].segs[0].length;
3312 int length1 = data[i].segs[1].length == -1 ? (int) ustrlen(data[i].segs[1].source) : data[i].segs[1].length;
3313 int length2 = data[i].segs[2].length == -1 ? (int) ustrlen(data[i].segs[2].source) : data[i].segs[2].length;
3314 printf(" /*%3d*/ { %s, %d, { %d, %d, \"%s\" }, { { TU(\"%s\"), %d, %d }, { TU(\"%s\"), %d, %d }, { TU(\"%s\"), %d, %d } }, %s, %d, %d, %d, \"%s\",\n",
3315 i, testUtilInputModeName(data[i].input_mode), data[i].option_2,
3316 data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
3317 testUtilEscape((const char *) data[i].segs[0].source, length, escaped, sizeof(escaped)), data[i].segs[0].length, data[i].segs[0].eci,
3318 testUtilEscape((const char *) data[i].segs[1].source, length1, escaped1, sizeof(escaped1)), data[i].segs[1].length, data[i].segs[1].eci,
3319 testUtilEscape((const char *) data[i].segs[2].source, length2, escaped2, sizeof(escaped2)), data[i].segs[2].length, data[i].segs[2].eci,
3320 testUtilErrorName(data[i].ret), symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
3321 if (ret < ZINT_ERROR) {
3322 testUtilModulesPrint(symbol, " ", "\n");
3323 } else {
3324 printf(" \"\"\n");
3325 }
3326 printf(" },\n");
3327 } else {
3328 if (ret < ZINT_ERROR) {
3329 int width, row;
3330
3331 assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n",
3332 i, symbol->rows, data[i].expected_rows);
3333 assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n",
3334 i, symbol->width, data[i].expected_width);
3335
3336 ret = testUtilModulesCmp(symbol, data[i].expected, &width, &row);
3337 assert_zero(ret, "i:%d testUtilModulesCmp ret %d != 0 width %d row %d\n",
3338 i, ret, width, row);
3339
3340 if (do_bwipp && testUtilCanBwipp(i, symbol, -1, data[i].option_2, -1, debug)) {
3341 if (!data[i].bwipp_cmp) {
3342 if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
3343 } else {
3344 ret = testUtilBwippSegs(i, symbol, -1, data[i].option_2, -1, data[i].segs, seg_count, NULL, bwipp_buf, sizeof(bwipp_buf));
3345 assert_zero(ret, "i:%d %s testUtilBwippSegs ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
3346
3347 ret = testUtilBwippCmp(symbol, bwipp_msg, bwipp_buf, data[i].expected);
3348 assert_zero(ret, "i:%d %s testUtilBwippCmp %d != 0 %s\n actual: %s\nexpected: %s\n",
3349 i, testUtilBarcodeName(symbol->symbology), ret, bwipp_msg, bwipp_buf, data[i].expected);
3350 }
3351 }
3352 }
3353 }
3354
3355 ZBarcode_Delete(symbol);
3356 }
3357
3358 testFinish();
3359 }
3360
3361 static void test_fuzz(const testCtx *const p_ctx) {
3362 int debug = p_ctx->debug;
3363
3364 struct item {
3365 int option_2;
3366 char *data;
3367 int length;
3368 int ret;
3369 int bwipp_cmp;
3370 char *comment;
3371 };
3372 /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
3373 static const struct item data[] = {
3374 /* 0*/ { -1, "3333P33B\035333V3333333333333\0363", -1, 0, 1, "" }, /* #181 Nico Gunkel, OSS-Fuzz */
3375 /* 1*/ { -1, "{{-06\024755712162106130000000829203983\377", -1, 0, 1, "" }, /* #232 Jan Schrewe, CI-Fuzz, out-of-bounds in is_last_single_ascii() sp + 1 */
3376 /* 2*/ { -1, "\000\000\000\367\000\000\000\000\000\103\040\000\000\244\137\140\140\000\000\000\000\000\000\000\000\000\005\000\000\000\000\000\165\060\060\060\060\061\060\060\114\114\060\010\102\102\102\102\102\102\102\102\057\102\100\102\057\233\100\102", 60, 0, 1, "" }, /* #300 (#4) Andre Maute (`c1_c40text_cnt()` not accounting for extended ASCII shifts) */
3377 /* 3*/ { 10, "\153\153\153\060\001\000\134\153\153\015\015\353\362\015\015\015\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015\362\362\000", 65, ZINT_ERROR_TOO_LONG, 1, "" }, /* #300 (#8) Andre Maute (`c1_encode()` looping on latch) */
3378 /* 4*/ { 10, "\015\015\353\362\015\015\015\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015\362\362\000", 39, 0, 1, "" }, /* #300 (#8 shortened) Andre Maute */
3379 /* 5*/ { 10, "\153\153\153\153\153\060\001\000\000\134\153\153\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\153\153\153\153\153\153\043\000\000\307\000\147\000\000\000\043\113\153\162\162\215\220", 90, ZINT_ERROR_TOO_LONG, 1, "" }, /* #300 (#12) Andre Maute (too small buffer for Version T) */
3380 };
3381 const int data_size = ARRAY_SIZE(data);
3382 int i, length, ret;
3383 struct zint_symbol *symbol = NULL;
3384
3385 char bwipp_buf[32768];
3386 char bwipp_msg[1024];
3387
3388 int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
3389
3390 testStartSymbol("test_fuzz", &symbol);
3391
3392 for (i = 0; i < data_size; i++) {
3393
3394 if (testContinue(p_ctx, i)) continue;
3395
3396 symbol = ZBarcode_Create();
3397 assert_nonnull(symbol, "Symbol not created\n");
3398
3399 length = testUtilSetSymbol(symbol, BARCODE_CODEONE, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
3400
3401 ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
3402 assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
3403
3404 if (ret < ZINT_ERROR) {
3405 if (do_bwipp && testUtilCanBwipp(i, symbol, -1, data[i].option_2, -1, debug)) {
3406 if (!data[i].bwipp_cmp) {
3407 if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
3408 } else {
3409 char modules_dump[4096];
3410 assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
3411 ret = testUtilBwipp(i, symbol, -1, data[i].option_2, -1, data[i].data, length, NULL, bwipp_buf, sizeof(bwipp_buf), NULL);
3412 assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
3413
3414 ret = testUtilBwippCmp(symbol, bwipp_msg, bwipp_buf, modules_dump);
3415 assert_zero(ret, "i:%d %s testUtilBwippCmp %d != 0 %s\n actual: %s\nexpected: %s\n",
3416 i, testUtilBarcodeName(symbol->symbology), ret, bwipp_msg, bwipp_buf, modules_dump);
3417 }
3418 }
3419 }
3420
3421 ZBarcode_Delete(symbol);
3422 }
3423
3424 testFinish();
3425 }
3426
3427 int main(int argc, char *argv[]) {
3428
3429 testFunction funcs[] = { /* name, func */
3430 { "test_large", test_large },
3431 { "test_input", test_input },
3432 { "test_encode", test_encode },
3433 { "test_encode_segs", test_encode_segs },
3434 { "test_fuzz", test_fuzz },
3435 };
3436
3437 testRun(argc, argv, funcs, ARRAY_SIZE(funcs));
3438
3439 testReport();
3440
3441 return 0;
3442 }
3443
3444 /* vim: set ts=4 sw=4 et : */