diff --git a/ChangeLog b/ChangeLog
index b9f722e9..e6042e3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-Version 2.16.0.9 (dev) not released yet (2026-02-26)
+Version 2.16.0.9 (dev) not released yet (2026-03-11)
====================================================
**Incompatible changes**
@@ -19,8 +19,9 @@ Changes
add `ZINT_TEST`-only "--test" option to do various internal tests
- GS1SE: exclude GS1_128 from requisite AIs check as may be spread across more
than one barcode (ticket #348, props Harald Oehlmann and Terry Burton)
-- AZTEC: add improved encoding algorithm, previous algorithm available via
- "--fast" (input_mode |= FAST_MODE)
+- AZTEC: add improved encoding algorithm adapted from ZXing, props Frank Yellin
+ and Rustam Abdullaev; previous algorithm available via "--fast" (input_mode
+ |= FAST_MODE)
- AZTEC: add new option "--azfull" (option_3 = ZINT_AZTEC_FULL) to only
consider Full symbols (not Compact ones) on automatic sizing
- GS1: new `GS1RAW_MODE` (CLI "--gs1raw") and GS1 Syntax Engine "Unbracketed AI
diff --git a/backend/aztec.c b/backend/aztec.c
index 69897654..4be3eebd 100644
--- a/backend/aztec.c
+++ b/backend/aztec.c
@@ -77,14 +77,9 @@ static int az_count_chr(const unsigned char source[], const int length, const in
static char az_get_next_mode(const char modes[], const int length, int i) {
const char current_mode = AZ_MASK(modes[i]);
- do {
- i++;
- } while (i < length && AZ_MASK(modes[i]) == current_mode);
+ for (i++; i < length && AZ_MASK(modes[i]) == current_mode; i++);
- if (i >= length) {
- return AZ_E;
- }
- return AZ_MASK(modes[i]);
+ return i < length ? AZ_MASK(modes[i]) : AZ_E;
}
#define AZ_DOUBLE_PUNCT_NO_LEN_CHECK(s, i) \
@@ -101,13 +96,9 @@ static int az_reduce(char *modes, unsigned char *source, const int length) {
modes[j] = modes[i];
if ((modes[i] == AZ_P || (modes[i] & AZ_PS)) && AZ_DOUBLE_PUNCT_NO_LEN_CHECK(source, i)) {
if (source[i] == '\r') {
- source[j] = 'a';
- } else if (source[i] == '.') {
- source[j] = 'b';
- } else if (source[i] == ',') {
- source[j] = 'c';
+ source[j] = 'a'; /* "\r\n" */
} else {
- source[j] = 'd';
+ source[j] = 'b' + 7 - ((source[i] & 0x0F) >> 1); /* ". " -> 'b', ", " -> 'c', ": " -> 'd' */
}
i += 2;
} else {
@@ -125,8 +116,8 @@ static int az_reduce(char *modes, unsigned char *source, const int length) {
/* Return mapped mode */
static char az_mode_char(const char mode) {
- /* Same order as AZ_U, AZ_L etc */
- static const char mode_chars[] = { '?', 'U', 'L', 'M', 'P', 'D', 'B', 'X', 'E' };
+ /* Same order as AZ_U, AZ_L etc */
+ static const char mode_chars[] = { 'U', 'L', 'M', 'P', 'D', 'B', 'X', 'E' };
char ch;
assert(ARRAY_SIZE(mode_chars) == AZ_E + 1);
@@ -167,7 +158,7 @@ static int az_text_modes(char modes[], unsigned char source[], int length, const
if (!z_isascii(source[i]) || !AztecFlags[source[i]]) {
modes[i] = AZ_B;
} else if (gs1 && source[i] == '\x1D') {
- modes[i] = AZ_P; /* For FLG(n) & FLG(0) = FNC1 */
+ modes[i] = AZ_P; /* For FLG(0) = FNC1 */
} else {
modes[i] = AztecModes[source[i]];
}
@@ -208,9 +199,7 @@ static int az_text_modes(char modes[], unsigned char source[], int length, const
}
} else if (current_mode == AZ_D) {
- if (next_mode != AZ_D && count <= 4) {
- memset(modes + i, AZ_D, 2 * count);
- } else if (next_mode == AZ_D && count <= 7) {
+ if ((next_mode != AZ_D && count <= 4) || (next_mode == AZ_D && count <= 7)) {
memset(modes + i, AZ_D, 2 * count);
}
}
@@ -249,13 +238,9 @@ static int az_text_modes(char modes[], unsigned char source[], int length, const
count = az_count_chr(source, reduced_length, i, '\r');
next_mode = az_get_next_mode(modes, reduced_length, i);
- if (current_mode == AZ_U && (next_mode == AZ_U || next_mode == AZ_B) && count == 1) {
- modes[i] = AZ_P;
-
- } else if (current_mode == AZ_L && (next_mode == AZ_L || next_mode == AZ_B) && count == 1) {
- modes[i] = AZ_P;
-
- } else if (current_mode == AZ_P || next_mode == AZ_P) {
+ if ((current_mode == AZ_U && (next_mode == AZ_U || next_mode == AZ_B) && count == 1)
+ || (current_mode == AZ_L && (next_mode == AZ_L || next_mode == AZ_B) && count == 1)
+ || current_mode == AZ_P || next_mode == AZ_P) {
modes[i] = AZ_P;
}
@@ -292,10 +277,8 @@ static int az_text_modes(char modes[], unsigned char source[], int length, const
}
} else if (current_mode == AZ_M) {
- if ((next_mode == AZ_E || next_mode == AZ_U || next_mode == AZ_L || next_mode == AZ_M)
- && count <= 4) {
- memset(modes + i, AZ_P, count);
- } else if (next_mode == AZ_B && count <= 2) {
+ if (((next_mode == AZ_E || next_mode == AZ_U || next_mode == AZ_L || next_mode == AZ_M) && count <= 4)
+ || (next_mode == AZ_B && count <= 2)) {
memset(modes + i, AZ_P, count);
}
@@ -314,44 +297,29 @@ static int az_text_modes(char modes[], unsigned char source[], int length, const
next_mode = az_get_next_mode(modes, reduced_length, i);
if (current_mode == AZ_U) {
- if (next_mode == AZ_E && count <= 5) {
- memset(modes + i, AZ_U, count);
- } else if ((next_mode == AZ_U || next_mode == AZ_L || next_mode == AZ_M || next_mode == AZ_P
- || next_mode == AZ_B) && count <= 9) {
+ if ((next_mode == AZ_E && count <= 5) || (next_mode != AZ_D && count <= 9)) {
memset(modes + i, AZ_U, count);
}
} else if (current_mode == AZ_L) {
- if (next_mode == AZ_E && count <= 5) {
+ if ((next_mode == AZ_E && count <= 5)
+ || (next_mode == AZ_L && count <= 14)
+ || ((next_mode == AZ_M || next_mode == AZ_P || next_mode == AZ_B) && count <= 9)) {
memset(modes + i, AZ_L, count);
} else if (next_mode == AZ_U && count == 1) {
modes[i] = AZ_L;
-
- } else if (next_mode == AZ_L && count <= 14) {
- memset(modes + i, AZ_L, count);
-
- } else if ((next_mode == AZ_M || next_mode == AZ_P || next_mode == AZ_B) && count <= 9) {
- memset(modes + i, AZ_L, count);
}
} else if (current_mode == AZ_M) {
- if ((next_mode == AZ_E || next_mode == AZ_U) && count <= 9) {
- memset(modes + i, AZ_M, count);
-
- } else if ((next_mode == AZ_L || next_mode == AZ_B) && count <= 14) {
- memset(modes + i, AZ_M, count);
-
- } else if ((next_mode == AZ_M || next_mode == AZ_P) && count <= 19) {
+ if (((next_mode == AZ_E || next_mode == AZ_U) && count <= 9)
+ || ((next_mode == AZ_L || next_mode == AZ_B) && count <= 14)
+ || ((next_mode == AZ_M || next_mode == AZ_P) && count <= 19)) {
memset(modes + i, AZ_M, count);
}
} else if (current_mode == AZ_P) {
- if (next_mode == AZ_E && count <= 5) {
- memset(modes + i, AZ_U, count);
-
- } else if ((next_mode == AZ_U || next_mode == AZ_L || next_mode == AZ_M || next_mode == AZ_P
- || next_mode == AZ_B) && count <= 9) {
+ if ((next_mode == AZ_E && count <= 5) || (next_mode != AZ_D && count <= 9)) {
memset(modes + i, AZ_U, count);
}
}
@@ -396,10 +364,8 @@ static int az_text_modes(char modes[], unsigned char source[], int length, const
} else if (current_mode == AZ_M && next_mode == AZ_M && count <= 2) {
memset(modes + i, AZ_M_PS, count);
- } else if (current_mode == AZ_D && next_mode != AZ_D && count <= 3) {
- memset(modes + i, AZ_D_PS, count);
-
- } else if (current_mode == AZ_D && next_mode == AZ_D && count <= 6) {
+ } else if (current_mode == AZ_D
+ && ((next_mode != AZ_D && count <= 3) || (next_mode == AZ_D && count <= 6))) {
memset(modes + i, AZ_D_PS, count);
}
@@ -432,7 +398,7 @@ static int az_text_modes(char modes[], unsigned char source[], int length, const
}
/* Cheapo to check if input all of one type of Byte-only, Upper, Lower or Digit, returning AZ_B, AZ_U, AZ_L or AZ_D
- resp., or 0 if not */
+ resp., or -1 if not */
static char az_all_byte_only_or_uld(const unsigned char source[], const int length) {
int i;
int byte_only, upper, lower, digit;
@@ -441,7 +407,7 @@ static char az_all_byte_only_or_uld(const unsigned char source[], const int leng
byte_only += !z_isascii(source[i]) || !AztecFlags[source[i]];
}
if (byte_only) {
- return byte_only == length ? AZ_B : 0;
+ return byte_only == length ? AZ_B : -1;
}
for (i = 0, upper = 0, lower = 0, digit = 0; i < length; i++) {
upper += !!(AztecFlags[source[i]] & AZ_U_F);
@@ -449,11 +415,10 @@ static char az_all_byte_only_or_uld(const unsigned char source[], const int leng
/* Dot, comma & space only non-digit AZ_D_F, exclude in case they're AZ_P doubles */
digit += z_isdigit(source[i]);
}
- return upper == length ? AZ_U : lower == length ? AZ_L : digit == length ? AZ_D : 0;
+ return upper == length ? AZ_U : lower == length ? AZ_L : digit == length ? AZ_D : -1;
}
-/* Count number of initial consecutive punct chars (with no special treatment of multi-mode chars, unlike
- following `az_count_punct()`), and assuming not GS1_MODE */
+/* Count number of initial consecutive punct chars, assuming not GS1_MODE */
static int az_count_initial_puncts(const unsigned char source[], const int length) {
int i;
@@ -467,409 +432,642 @@ static int az_count_initial_puncts(const unsigned char source[], const int lengt
return i;
}
-/* Count number of consecutive punct chars, treating multi-modes CR (without LF), dot and comma singularly */
-static int az_count_punct(const unsigned char source[], const int length, const int position, const int gs1,
- int *begins_double) {
- const unsigned ch = source[position];
+/* Optimized encoding stuff - see `az_binary_string()` */
- assert(z_isascii(ch));
+struct az_token {
+ short value;
+ short count; /* If negative, bit count of simple (not binary shift) token, else byte count */
+};
- *begins_double = AZ_DOUBLE_PUNCT(source, length, position);
+struct az_token_list {
+ struct az_token *tokens;
+ unsigned short used;
+ unsigned short size; /* Capacity */
+};
- if (!*begins_double && (ch == '\r' || ch == '.' || ch == ',')) {
- return 1;
+/* Represents all information about a sequence necessary to generate the current output */
+struct az_state {
+ /* The list of tokens output. If in B/S mode, this does *not* yet include the token for those bytes */
+ struct az_token_list tokens;
+ short mode; /* The current mode of the encoding, or the mode to return to if in B/S mode */
+ short byteCount; /* If non-zero, the number of most recent bytes that should be output in B/S mode */
+ unsigned short bitCount; /* The total number of bits generated (including B/S) */
+};
+
+struct az_state_list {
+ struct az_state* states;
+ unsigned short used;
+ unsigned short size;
+};
+
+#define AZ_MIN_STATES_SIZE 4
+#define AZ_MIN_TOKENS_SIZE 32
+
+/* Initialize a state list */
+static int az_state_list_init(struct az_state_list *list, const unsigned short initial_size) {
+ const unsigned short size = initial_size < AZ_MIN_STATES_SIZE ? AZ_MIN_STATES_SIZE : initial_size;
+
+ if (!(list->states = (struct az_state *) malloc(sizeof(struct az_state) * size))) {
+ list->used = list->size = 0;
+ return 0;
}
- if ((gs1 && ch == '\x1D') || (AztecFlags[ch] & AZ_P_F)) {
- int i;
- if (gs1) {
- for (i = position + 1 + *begins_double; i < length && z_isascii(source[i]); i++) {
- if (AZ_DOUBLE_PUNCT(source, length, i)) {
- i++;
- } else if (source[i] != '\x1D' && (!(AztecFlags[source[i]] & AZ_P_F)
- || source[i] == '\r' || source[i] == '.' || source[i] == ',')) {
- break;
- }
+ list->size = size;
+ list->used = 0;
+ return 1;
+}
+
+/* Copy a state `src` to `dst` */
+static int az_state_cpy(const struct az_state *src, struct az_state *dst) {
+ const unsigned short size = src->tokens.size < AZ_MIN_TOKENS_SIZE ? AZ_MIN_TOKENS_SIZE : src->tokens.size;
+
+ *dst = *src;
+ if (!(dst->tokens.tokens = (struct az_token *) malloc(sizeof(struct az_token) * size))) {
+ return 0;
+ }
+ if (src->tokens.used) {
+ memcpy(dst->tokens.tokens, src->tokens.tokens, sizeof(struct az_token) * src->tokens.used);
+ }
+ dst->tokens.size = size;
+ return 1;
+}
+
+/* Free `state`, i.e. free its token list */
+static void az_state_free(struct az_state *state) {
+ if (state->tokens.tokens) {
+ free(state->tokens.tokens);
+ state->tokens.tokens = NULL;
+ }
+}
+
+/* Check that there's enough room for `extra` more tokens in `state` */
+static int az_tokens_add_chk(struct az_state *state, const int extra) {
+ assert(extra < AZ_MIN_TOKENS_SIZE);
+ if (!state->tokens.tokens) {
+ const unsigned short size = AZ_MIN_TOKENS_SIZE;
+ if (!(state->tokens.tokens = (struct az_token *) malloc(sizeof(struct az_token) * size))) {
+ return 0;
+ }
+ state->tokens.size = size;
+ state->tokens.used = 0;
+ } else if (state->tokens.used + extra >= state->tokens.size) {
+ struct az_token *tokens;
+ const unsigned short size = state->tokens.size * 2;
+ if (size <= state->tokens.size /* Overflow */
+ || !(tokens = (struct az_token *) realloc(state->tokens.tokens, sizeof(struct az_token) * size))) {
+ return 0;
+ }
+ assert(size > state->tokens.used + extra);
+ state->tokens.tokens = tokens;
+ state->tokens.size = size;
+ }
+ return 1;
+}
+
+/* Check have enough room to add a state to state list `list` */
+static int az_state_list_add_chk(struct az_state_list *list) {
+ if (list->used == list->size) {
+ struct az_state *states;
+ const unsigned short size = list->size * 2;
+ if (size <= list->size /* Overflow */
+ || !(states = (struct az_state *) realloc(list->states, sizeof(struct az_state) * size))) {
+ return 0;
+ }
+ list->states = states;
+ list->size = size;
+ }
+ return 1;
+}
+
+/* Free all states (including their tokens) of state list `list` */
+static void az_state_list_free(struct az_state_list *list) {
+ int i;
+ if (list->states) {
+ for (i = 0; i < list->used; i++) {
+ if (list->states[i].tokens.tokens) {
+ free(list->states[i].tokens.tokens);
}
- return i - position;
- } else {
- for (i = position + 1 + *begins_double; i < length && z_isascii(source[i]); i++) {
- if (AZ_DOUBLE_PUNCT(source, length, i)) {
- i++;
- } else if (!(AztecFlags[source[i]] & AZ_P_F)
- || source[i] == '\r' || source[i] == '.' || source[i] == ',') {
- break;
- }
- }
- return i - position;
+ }
+ free(list->states);
+ list->states = NULL;
+ }
+ list->used = list->size = 0;
+}
+
+#define AZ_FNC1_VAL 32 /* Pseudo-value for FNC1 - converted to 0 on setting token value */
+
+/* Shorthand to add a token to state `s` */
+#define AZ_ADD_TOKEN(s, v, c) \
+ (s)->tokens.tokens[(s)->tokens.used].value = (v); \
+ (s)->tokens.tokens[(s)->tokens.used++].count = (c)
+
+/* Add a new state to `list` from `state`, with a latch if modes differ, and then a char, or 2 if `value2` set */
+static int az_LatchMaybeAndAppend(const struct az_state *state, const int from, const int mode, const int value,
+ const int value2, struct az_state_list *list) {
+ int latchModeBitCount = mode == AZ_D ? 4 : 5;
+ int val = value;
+ int bitCount = state->bitCount;
+ struct az_state *new_state;
+
+ if (!az_state_list_add_chk(list)) {
+ return 0;
+ }
+ new_state = list->states + list->used++;
+ if (!az_state_cpy(state, new_state) || !az_tokens_add_chk(new_state, 4 /*extra*/)) {
+ return 0;
+ }
+ /* End B/S if any */
+ if (state->byteCount != 0) {
+ AZ_ADD_TOKEN(new_state, from - state->byteCount, state->byteCount);
+ new_state->byteCount = 0;
+ }
+
+ /* Latch if necessary */
+ if (mode != state->mode) {
+ AZ_ADD_TOKEN(new_state, AztecLatch[state->mode][mode], -AztecLatchNum[state->mode][mode]);
+ bitCount += AztecLatchNum[state->mode][mode];
+ }
+ if (val == AZ_FNC1_VAL) { /* FNC1 */
+ latchModeBitCount += 3;
+ val = 0;
+ }
+ AZ_ADD_TOKEN(new_state, val, -latchModeBitCount);
+ bitCount += latchModeBitCount;
+ if (value2 != -1) {
+ latchModeBitCount = mode == AZ_D ? 4 : 5;
+ val = value2;
+ if (val == AZ_FNC1_VAL) { /* FNC1 */
+ latchModeBitCount += 3;
+ val = 0;
+ }
+ AZ_ADD_TOKEN(new_state, val, -latchModeBitCount);
+ bitCount += latchModeBitCount;
+ }
+ new_state->mode = mode;
+ new_state->bitCount = bitCount;
+ return 1;
+}
+
+/* Add a new state to `list` from `state`, with a temporary shift to a different mode to output a single value */
+static int az_ShiftAndAppend(const struct az_state *state, const int from, const int mode, const int value,
+ struct az_state_list *list) {
+ const int thisModeBitCount = state->mode == AZ_D ? 4 : 5;
+ int bitCount = 5;
+ int val = value;
+ struct az_state *new_state;
+
+ assert(state->mode != mode);
+
+ if (!az_state_list_add_chk(list)) {
+ return 0;
+ }
+ new_state = list->states + list->used++;
+ if (!az_state_cpy(state, new_state) || !az_tokens_add_chk(new_state, 3 /*extra*/)) {
+ return 0;
+ }
+ /* End B/S if any */
+ if (state->byteCount != 0) {
+ AZ_ADD_TOKEN(new_state, from - state->byteCount, state->byteCount);
+ new_state->byteCount = 0;
+ }
+
+ /* Shifts exist only to AZ_U and AZ_P, both with tokens size 5 */
+ AZ_ADD_TOKEN(new_state, AztecShift[state->mode][mode], -thisModeBitCount);
+ if (val == AZ_FNC1_VAL) { /* FNC1 */
+ val = 0;
+ bitCount += 3;
+ }
+ AZ_ADD_TOKEN(new_state, val, -bitCount);
+ new_state->mode = state->mode;
+ new_state->bitCount = state->bitCount + thisModeBitCount + bitCount;
+ return 1;
+}
+
+/* Add a new state to `list` from `state`, with a latch to AZ_D and shift to AZ_P or AZ_U encoding `value`
+ - may save a bit due to AZ_D's 4-bit shift */
+static int az_DigitLatchShiftAndAppend(const struct az_state *state, const int from, const int shiftMode,
+ const int value, struct az_state_list *list) {
+ const int bitCount = state->bitCount + AztecLatchNum[state->mode][AZ_D] + 4 /*P/S or U/S*/;
+ int val = value;
+ int valBitCount = 5;
+ struct az_state *new_state;
+
+ assert(state->mode != AZ_D);
+ assert(shiftMode == AZ_P || shiftMode == AZ_U);
+ assert(state->mode != AZ_U || shiftMode != AZ_U);
+
+ if (!az_state_list_add_chk(list)) {
+ return 0;
+ }
+ new_state = list->states + list->used++;
+ if (!az_state_cpy(state, new_state) || !az_tokens_add_chk(new_state, 4 /*extra*/)) {
+ return 0;
+ }
+ /* End B/S if any */
+ if (state->byteCount != 0) {
+ AZ_ADD_TOKEN(new_state, from - state->byteCount, state->byteCount);
+ new_state->byteCount = 0;
+ }
+
+ /* Latch to AZ_D */
+ AZ_ADD_TOKEN(new_state, AztecLatch[state->mode][AZ_D], -AztecLatchNum[state->mode][AZ_D]);
+ /* P/S or U/S */
+ AZ_ADD_TOKEN(new_state, AztecShift[AZ_D][shiftMode], -4);
+ if (val == AZ_FNC1_VAL) { /* FNC1 */
+ valBitCount += 3;
+ val = 0;
+ }
+ AZ_ADD_TOKEN(new_state, val, -valBitCount);
+ new_state->mode = AZ_D;
+ new_state->bitCount = bitCount + valBitCount;
+ return 1;
+}
+
+/* Add a new state to `list` from `state`, but with an additional char in B/S mode, or 2 if `from2` set */
+static int az_AddByteShiftChar(const struct az_state *state, const int from, const int from2,
+ struct az_state_list *list) {
+ int mode = state->mode;
+ int bitCount = state->bitCount;
+ const int deltaBitCount = state->byteCount == 0 || state->byteCount == 31 ? 18 : state->byteCount == 62 ? 9 : 8;
+ struct az_state *new_state;
+
+ if (!az_state_list_add_chk(list)) {
+ return 0;
+ }
+ new_state = list->states + list->used++;
+ if (!az_state_cpy(state, new_state) || !az_tokens_add_chk(new_state, 3 /*extra*/)) {
+ return 0;
+ }
+
+ if (state->mode == AZ_P || state->mode == AZ_D) {
+ assert(state->byteCount == 0);
+ AZ_ADD_TOKEN(new_state, AztecLatch[mode][AZ_U], -AztecLatchNum[mode][AZ_U]);
+ bitCount += AztecLatchNum[mode][AZ_U];
+ mode = AZ_U;
+ }
+ new_state->mode = mode;
+ new_state->byteCount = state->byteCount + 1;
+ new_state->bitCount = bitCount + deltaBitCount;
+ if (new_state->byteCount == 2047 + 31) {
+ /* The string is as long as it's allowed to be - end it */
+ AZ_ADD_TOKEN(new_state, from + 1 - new_state->byteCount, new_state->byteCount);
+ new_state->byteCount = 0;
+ }
+ if (from2 != -1) {
+ const int deltaBitCount2 = new_state->byteCount == 0 || new_state->byteCount == 31
+ ? 18 : new_state->byteCount == 62 ? 9 : 8;
+ new_state->byteCount++;
+ new_state->bitCount += deltaBitCount2;
+ if (new_state->byteCount == 2047 + 31) {
+ /* The string is as long as it's allowed to be - end it */
+ AZ_ADD_TOKEN(new_state, from2 + 1 - new_state->byteCount, new_state->byteCount);
+ new_state->byteCount = 0;
}
}
+ return 1;
+}
+/* Set the state `ret_state` identical to `state`, but no longer in B/S mode */
+static int az_EndByteShift(const struct az_state *state, struct az_state *ret_state, const int from) {
+
+ if (!az_state_cpy(state, ret_state)) {
+ return 0;
+ }
+ if (state->byteCount == 0) {
+ return 1;
+ }
+ if (!az_tokens_add_chk(ret_state, 1 /*extra*/)) {
+ return 0;
+ }
+ AZ_ADD_TOKEN(ret_state, from - state->byteCount, state->byteCount);
+ ret_state->byteCount = 0;
+ return 1;
+}
+
+/* Helper for `az_IsBetterThanOrEqualTo()` to return bit-cost of B/S */
+static int az_CalculateByteShiftCost(const struct az_state *state) {
+ if (state->byteCount > 0) {
+ if (state->byteCount > 31) {
+ return 20 + (state->byteCount > 62); /* Two B/S's or one B/S with extended length */
+ }
+ return 10; /* One B/S */
+ }
return 0;
}
-/* Count number of consecutive Upper chars, treating multi-mode space singularly */
-static int az_count_upper(const unsigned char source[], const int length, const int position) {
- int i;
+/* Return 1 if `state` is better (or equal) to be in than `other` state under all possible circumstances */
+static int az_IsBetterThanOrEqualTo(const struct az_state *state, const struct az_state *other) {
+ int newModeBitCount = state->bitCount + AztecLatchNum[state->mode][other->mode];
- if (source[position] == ' ') {
- return 1;
- }
- for (i = position; i < length && source[i] != ' ' && z_isascii(source[i]) && (AztecFlags[source[i]] & AZ_U_F);
- i++);
-
- return i - position;
-}
-
-/* Count number of consecutive Lower chars, treating multi-mode space singularly */
-static int az_count_lower(const unsigned char source[], const int length, const int position) {
- int i;
-
- if (source[position] == ' ') {
- return 1;
- }
- for (i = position; i < length && source[i] != ' ' && z_isascii(source[i]) && (AztecFlags[source[i]] & AZ_L_F);
- i++);
-
- return i - position;
-}
-
-/* Count number of consecutive Mixed chars, treating multi-mode CR singularly */
-static int az_count_mixed(const unsigned char source[], const int length, const int position, const int gs1) {
- int i;
-
- if (source[position] == '\r') {
- return 1;
- }
- for (i = position; i < length && z_isascii(source[i]) && (AztecFlags[source[i]] & AZ_M_F)
- && (!gs1 || source[i] != '\x1D') && source[i] != '\r'; i++);
-
- return i - position;
-}
-
-/* Count number of consecutive Digit chars, treating multi-modes dot, comma and space singularly */
-static int az_count_digit(const unsigned char source[], const int length, const int position) {
- int i;
-
- if (source[position] == '.' || source[position] == ',' || source[position] == ' ') {
- return 1;
- }
- for (i = position; i < length && z_isdigit(source[i]); i++); /* Dot, comma & space only non-digit AZ_D_F */
-
- return i - position;
-}
-
-/* Count number of consecutive Byte-only chars */
-static int az_count_byte_only(const unsigned char source[], const int length, const int position) {
- int i;
-
- for (i = position; i < length && (!z_isascii(source[i]) || !AztecFlags[source[i]]); i++);
-
- return i - position;
-}
-
-/* Bit-size of encoding punct chars */
-static int az_punct_size(const unsigned char source[], const int len, const int gs1) {
- int i;
- int cnt_doubles = 0;
-
- if (gs1) {
- int cnt_fnc1s = 0;
- for (i = 0; i + 1 < len; i++) {
- cnt_doubles += AZ_DOUBLE_PUNCT_NO_LEN_CHECK(source, i);
- cnt_fnc1s += source[i] == '\x1D';
+ if (other->byteCount > 0) {
+ if (state->byteCount < other->byteCount) {
+ /* Add additional B/S encoding cost of other, if any */
+ newModeBitCount += az_CalculateByteShiftCost(other) - az_CalculateByteShiftCost(state);
+ } else if (state->byteCount > other->byteCount) {
+ /* Maximum possible additional cost (`state` ends up exceeding the 31 byte boundary
+ and `other` state can stay beneath it) */
+ newModeBitCount += 10;
}
- cnt_fnc1s += source[i] == '\x1D';
- return 5 * (len - cnt_doubles - cnt_fnc1s) + (cnt_fnc1s << 3);
}
- for (i = 0; i + 1 < len; i++) {
- cnt_doubles += AZ_DOUBLE_PUNCT_NO_LEN_CHECK(source, i);
- }
- return 5 * (len - cnt_doubles);
+ return newModeBitCount <= other->bitCount;
}
-struct az_edge {
- unsigned char mode;
- unsigned char startMode; /* For Byte edges */
- unsigned short from; /* Position in input data, 0-based */
- unsigned short len;
- unsigned short size; /* Cumulative number of bits */
- unsigned short bytes; /* Byte count for AZ_X */
- unsigned short previous; /* Index into edges array */
-};
-
-/* Note 1st row of edges not used so valid previous cannot point there, i.e. won't be zero */
-#define AZ_PREVIOUS(edges, edge) \
- ((edge)->previous ? (edges) + (edge)->previous : NULL)
-
#if 0
-#include "aztec_trace.h"
+#define AZ_DEBUG_LIST
+#endif
+#ifndef AZ_DEBUG_LIST
+static void az_dump_list(const struct az_state_list *list, const char *prefix) {
+ (void)list, (void)prefix;
+}
#else
-#define AZ_TRACE_Edges(px, s, l, im, p, v)
-#define AZ_TRACE_AddEdge(s, l, es, p, v, e) do { (void)(s); (void)(l); } while (0)
-#define AZ_TRACE_NotAddEdge(s, l, es, p, v, ij, e) do { (void)(s); (void)(l); } while (0)
+static void az_dump_list(const struct az_state_list *list, const char *prefix) {
+ static char spaces[50 + 1] = " ";
+ const int pl = (int) strlen(prefix);
+ int i;
+ fprintf(stderr, "%sSize %d\n", prefix, (int) list->used);
+ for (i = 0; i < list->used; i++) {
+ const struct az_state *state = list->states + i;
+ fprintf(stderr, "%.*s %d: mode %d, Size(tokens) %d\n", pl, spaces, (int) i, state->mode,
+ (int) state->tokens.used);
+ }
+}
#endif
-/* Initialize a new edge. */
-static void az_new_Edge(const struct az_edge *edges, const char mode, const unsigned char *source, const int from,
- const int len, const int gs1, const int initial_mode, const struct az_edge *previous,
- struct az_edge *edge) {
+/* Iterate through states, removing those that are sub-optimal */
+static void az_SimplifyStates(struct az_state_list *list) {
+ int i, j;
+ const int rmap_size = (list->used + 7) >> 3;
+ unsigned char *rmap = (unsigned char *) z_alloca(rmap_size); /* Map of entries removed */
+ const struct az_state *new_state, *old_state;
- /* Bit-size of switching modes from row to col */
- static const unsigned int switch_sizes[AZ_NUM_MODES - 1][AZ_NUM_MODES] = {
- /* U L M P D B */
- /*U*/ { 0, 5, 5, 5 + 5, 5, 5 + 5, },
- /*L*/ { 5 + 4, 0, 5, 5 + 5, 5, 5 + 5, },
- /*M*/ { 5, 5, 0, 5, 5 + 5, 5 + 5, },
- /*P*/ { 5, 5 + 5, 5 + 5, 0, 5 + 5, 5 + 5 + 5, },
- /*D*/ { 4, 4 + 5, 4 + 5, 4 + 5 + 5, 0, 4 + 5 + 5, },
- /*B - not used*/
- };
- const int mask_mode = AZ_MASK(mode);
- int previousMode;
- int previousStartMode;
+ memset(rmap, 0, rmap_size);
- assert(len > 0);
+ az_dump_list(list, " SS in ");
- edge->mode = mode;
- edge->from = from;
- edge->len = len;
- if (previous) {
- edge->size = previous->size;
- edge->previous = previous - edges;
- previousMode = AZ_MASK(previous->mode);
- previousStartMode = previous->startMode;
- } else {
- edge->size = 0;
- edge->previous = 0;
- previousMode = AZ_MASK(initial_mode);
- previousStartMode = previousMode;
- }
-
- switch (mask_mode) {
- case AZ_U:
- case AZ_L:
- case AZ_M:
- if (mode & AZ_PS) {
- assert(len <= 2);
- edge->size += 5 /*P/S*/ + az_punct_size(source + from, len, gs1);
- } else if (mode & AZ_US) {
- assert(len == 1);
- assert(mask_mode == AZ_L);
- edge->size += 5 /*U/S*/ + 5;
- } else {
- edge->size += 5 * len;
- }
- edge->size += switch_sizes[(previousMode == AZ_B ? previousStartMode : previousMode) - 1][mask_mode - 1];
- edge->startMode = mask_mode;
- break;
- case AZ_P:
- assert(mask_mode == mode);
- edge->size += az_punct_size(source + from, len, gs1);
- edge->size += switch_sizes[(previousMode == AZ_B ? previousStartMode : previousMode) - 1][mask_mode - 1];
- edge->startMode = AZ_U;
- break;
- case AZ_D:
- if (mode & AZ_PS) {
- assert(len <= 2);
- edge->size += 4 /*P/S*/ + az_punct_size(source + from, len, gs1);
- } else if (mode & AZ_US) {
- assert(len == 1);
- edge->size += 4 /*U/S*/ + 5;
- } else {
- edge->size += 4 * len;
- }
- edge->size += switch_sizes[(previousMode == AZ_B ? previousStartMode : previousMode) - 1][mask_mode - 1];
- edge->startMode = AZ_U;
- break;
- case AZ_B:
- assert(mask_mode == mode);
- if (previousMode != mask_mode) {
- edge->size += switch_sizes[previousMode - 1][mask_mode - 1];
- if (len > 31) {
- edge->size += 11;
- }
- edge->bytes = len;
- } else {
- if (len + previous->bytes > 31) {
- if (previous->bytes <= 31) {
- /* Note this may be sub-optimal as not taken into account when previous edge added */
- edge->size += 11;
+ for (i = 0; i < list->used; i++) {
+ if (!(rmap[i >> 3] & (1 << (i & 0x7)))) {
+ new_state = list->states + i;
+ for (j = i + 1; j < list->used; j++) {
+ if (!(rmap[j >> 3] & (1 << (j & 0x7)))) {
+ old_state = list->states + j;
+ if (az_IsBetterThanOrEqualTo(old_state, new_state)) {
+ rmap[i >> 3] |= 1 << (i & 0x7);
+ break;
+ }
+ if (az_IsBetterThanOrEqualTo(new_state, old_state)) {
+ rmap[j >> 3] |= 1 << (j & 0x7);
}
}
- edge->bytes = len + previous->bytes;
- }
- edge->size += len << 3;
- edge->startMode = previousStartMode;
- break;
- }
- assert(edge->startMode && AZ_MASK(edge->startMode) == edge->startMode && edge->startMode != AZ_B);
-}
-
-/* Add an edge for a mode at a vertex if no existing edge or if more optimal than existing edge */
-static void az_addEdge(const unsigned char *source, const int length, struct az_edge *edges, const char mode,
- const int from, const int len, const int gs1, const int initial_mode, const struct az_edge *previous) {
- struct az_edge edge;
- const int vertexIndex = from + len;
- const int v_ij = vertexIndex * AZ_NUM_MODES + AZ_MASK(mode) - 1;
-
- az_new_Edge(edges, mode, source, from, len, gs1, initial_mode, previous, &edge);
-
- if (edges[v_ij].mode == 0 || edges[v_ij].size > edge.size) {
- AZ_TRACE_AddEdge(source, length, edges, previous, vertexIndex, &edge);
- edges[v_ij] = edge;
- } else {
- AZ_TRACE_NotAddEdge(source, length, edges, previous, vertexIndex, v_ij, &edge);
- }
-}
-
-/* Add edges for the various modes at a vertex */
-static void az_addEdges(const unsigned char source[], const int length, const int gs1, const int initial_mode,
- struct az_edge *edges, const int from, const struct az_edge *previous) {
- const unsigned char ch = source[from];
- int len;
-
- if (z_isascii(ch) && AztecFlags[ch]) {
- int begins_double;
-
- if ((len = az_count_punct(source, length, from, gs1, &begins_double))) {
- az_addEdge(source, length, edges, AZ_P, from, len, gs1, initial_mode, previous);
-
- az_addEdge(source, length, edges, AZ_U_PS, from, 1 + begins_double, gs1, initial_mode, previous);
- az_addEdge(source, length, edges, AZ_L_PS, from, 1 + begins_double, gs1, initial_mode, previous);
- if (ch != '\r') {
- az_addEdge(source, length, edges, AZ_M_PS, from, 1 + begins_double, gs1, initial_mode, previous);
- }
- if (ch != '.' && ch != ',') {
- az_addEdge(source, length, edges, AZ_D_PS, from, 1 + begins_double, gs1, initial_mode, previous);
}
}
- if ((len = az_count_upper(source, length, from))) {
- az_addEdge(source, length, edges, AZ_U, from, len, gs1, initial_mode, previous);
- }
- if ((len = az_count_lower(source, length, from))) {
- az_addEdge(source, length, edges, AZ_L, from, len, gs1, initial_mode, previous);
- }
- if ((len = az_count_mixed(source, length, from, gs1))) {
- az_addEdge(source, length, edges, AZ_M, from, len, gs1, initial_mode, previous);
- }
- if ((len = az_count_digit(source, length, from))) {
- az_addEdge(source, length, edges, AZ_D, from, len, gs1, initial_mode, previous);
- }
-
- if (z_isupper(ch)) { /* Space only non-upper AZ_U_F */
- az_addEdge(source, length, edges, AZ_L_US, from, 1, gs1, initial_mode, previous);
- az_addEdge(source, length, edges, AZ_D_US, from, 1, gs1, initial_mode, previous);
+ }
+ for (i = list->used - 1; i >= 0; i--) {
+ if (rmap[i >> 3] & (1 << (i & 0x7))) {
+ const int k = i + 1;
+ /* Remove consecutive entries in one go */
+ for (j = i - 1; j >= 0 && (rmap[j >> 3] & (1 << (j & 0x7))); j--) {
+ az_state_free(list->states + j + 1);
+ }
+ az_state_free(list->states + j + 1);
+ if (k < list->used) {
+ memmove(list->states + j + 1, list->states + k, sizeof(struct az_state) * (list->used - k));
+ }
+ list->used -= i - j;
+ i = j + 1;
}
}
- if (!gs1 || ch != '\x1D') {
- if (ch == '\r' || ch == ' ' || ch == '.' || ch == ',') { /* Multi-mode chars */
- len = 1;
- } else {
- len = 1 + az_count_byte_only(source, length, from + 1);
- }
- az_addEdge(source, length, edges, AZ_B, from, len, gs1, initial_mode, previous);
- }
+ az_dump_list(list, " SS out ");
}
-/* Default, close to optimal encoding, using Dijkstra-based algorithm adapted from Data Matrix one by Alex Geller.
- Note that a bitstream that is encoded to be shortest based on mode choices may not be so after bit-stuffing */
-static int az_define_modes(char modes[], unsigned char source[], const int length, const int gs1,
- const char initial_mode, const int debug_print) {
- int i, j, v_i;
- int minimalJ, minimalSize;
- struct az_edge *edge;
- int mode_end, mode_len;
- int reduced_length;
- struct az_edge *edges;
-
- if ((length + 1) * AZ_NUM_MODES > USHRT_MAX
- || !(edges = (struct az_edge *) calloc((length + 1) * AZ_NUM_MODES, sizeof(struct az_edge)))) {
+/* Return a set of states for a Punct double - see `az_UpdateStateForChar()` below */
+static int az_UpdateStateForPair(const struct az_state *state, const int from, const int pairCode,
+ struct az_state_list *ret_list) {
+ /* Possibility 1: latch to AZ_P, and then append this code */
+ if (!az_LatchMaybeAndAppend(state, from, AZ_P, pairCode, -1 /*value2*/, ret_list)) {
return 0;
}
- az_addEdges(source, length, gs1, initial_mode, edges, 0, NULL);
+ if (state->mode != AZ_P) {
+ /* Possibility 2: shift to AZ_P, and then append this code.
+ Every state except AZ_P (handled above) can shift */
+ if (!az_ShiftAndAppend(state, from, AZ_P, pairCode, ret_list)) {
+ return 0;
+ }
+ }
+ if (pairCode == 3 || pairCode == 4) {
+ /* Both characters are in AZ_D. Sometimes better to just add two digits */
+ if (!az_LatchMaybeAndAppend(state, from, AZ_D, 16 - pairCode /*'.' or ','*/, 1 /*space*/, ret_list)) {
+ return 0;
+ }
+ }
+ if (state->byteCount > 0) {
+ /* It only makes sense to do the characters as binary if already in B/S mode */
+ if (!az_AddByteShiftChar(state, from, from + 1, ret_list)) {
+ return 0;
+ }
+ }
+ return 1;
+}
- AZ_TRACE_Edges("DEBUG Initial situation\n", source, length, initial_mode, edges, 0);
-
- assert(length > 0); /* Suppress clang-tidy clang-analyzer-security.ArrayBound warning */
-
- for (i = 1; i < length; i++) {
- v_i = i * AZ_NUM_MODES;
- for (j = 0; j < AZ_NUM_MODES; j++) {
- if (edges[v_i + j].mode) {
- az_addEdges(source, length, gs1, initial_mode, edges, i, edges + v_i + j);
+/* Return a set of states that represent the possible ways of updating this state for the next character.
+ The resulting set of states are added to `ret_list` */
+static int az_UpdateStateForChar(const struct az_state *state, const unsigned char *source, const int from,
+ const int gs1, struct az_state_list *ret_list) {
+ unsigned char ch = source[from];
+ const int fnc1 = gs1 && ch == '\x1D';
+ const int charInCurrentTable = (fnc1 && state->mode == AZ_P)
+ || (z_isascii(ch) && (AztecFlags[ch] & (1 << state->mode)));
+ if (z_isascii(ch)) {
+ int mode;
+ for (mode = 0; mode < AZ_NUM_MODES; mode++) {
+ const int charInModeTable = (fnc1 && mode == AZ_P) || (AztecFlags[ch] & (1 << mode));
+ if (charInModeTable) {
+ /* Try generating the char by latching to its mode */
+ if (!charInCurrentTable || mode == state->mode || (mode == AZ_D && !fnc1)) {
+ /* If the char is in the current table, we don't want to latch to any other mode except possibly
+ digit (which uses only 4 bits). Any other latch would be equally successful *after* this char,
+ and so wouldn't save any bits */
+ const int latchChar = fnc1 ? AZ_FNC1_VAL : AztecChar[mode][ch];
+ if (!az_LatchMaybeAndAppend(state, from, mode, latchChar, -1 /*value2*/, ret_list)) {
+ return 0;
+ }
+ }
+ /* Try generating the char by switching to its mode */
+ if (!charInCurrentTable && AztecShift[state->mode][mode] >= 0) {
+ /* It never makes sense to temporarily shift to another mode if the char exists in the current
+ mode. That can never save bits */
+ const int shiftChar = fnc1 ? AZ_FNC1_VAL : AztecChar[mode][ch];
+ if (!az_ShiftAndAppend(state, from, mode, shiftChar, ret_list)) {
+ return 0;
+ }
+ }
}
}
- AZ_TRACE_Edges("DEBUG situation after adding edges to vertices at position %d\n", source, length,
- initial_mode, edges, i);
- }
-
- AZ_TRACE_Edges("DEBUG Final situation\n", source, length, initial_mode, edges, length);
-
- #if 0
- {
- const int fw = length * AZ_NUM_MODES > 100 ? 3 : 2;
- fputs("Dump of edges:\n", stdout);
- for (i = 0; i < length + 1; i++) {
- v_i = i * AZ_NUM_MODES;
- for (j = 0; j < AZ_NUM_MODES; j++) {
- fprintf(stdout, " %*d(%02X,%*d,%*d,%*d)",
- fw, v_i + j, edges[v_i + j].mode, fw, edges[v_i + j].len, fw, edges[v_i + j].size,
- fw, edges[v_i + j].previous);
+ /* It may be better to latch to AZ_D early if have shift (saves 1 bit) */
+ if (state->mode != AZ_D && !charInCurrentTable && !(AztecFlags[ch] & AZ_D_F)
+ && (fnc1 || (AztecFlags[ch] & (AZ_U_F | AZ_P_F)))) {
+ const int shiftMode = AztecFlags[ch] & AZ_U_F ? AZ_U : AZ_P;
+ const int shiftChar = fnc1 ? AZ_FNC1_VAL : AztecChar[shiftMode][ch];
+ if (!az_DigitLatchShiftAndAppend(state, from, shiftMode, shiftChar, ret_list)) {
+ return 0;
}
- fputc('\n', stdout);
}
- fputc('\n', stdout);
}
- #endif
+ if (!fnc1 && (state->byteCount > 0 || !charInCurrentTable)) {
+ /* It's never worthwhile to go into B/S mode if not already in B/S mode, and the char exists in current mode.
+ That can never save bits over just outputting the char in the current mode */
+ if (!az_AddByteShiftChar(state, from, -1 /*from2*/, ret_list)) {
+ return 0;
+ }
+ }
+ return 1;
+}
- v_i = length * AZ_NUM_MODES;
- minimalJ = -1;
- minimalSize = INT_MAX;
- for (j = 0; j < AZ_NUM_MODES; j++) {
- edge = edges + v_i + j;
- if (edge->mode) {
- if (debug_print) {
- printf("edges[%d][%d][0] size %d\n", length, j, edge->size);
- }
- if (edge->size < minimalSize) {
- minimalSize = edge->size;
- minimalJ = j;
- if (debug_print) printf(" set minimalJ %d\n", minimalJ);
+/* Update a set of states for a Punct double - see `az_UpdateStateListForChar()` below */
+static int az_UpdateStateListForPair(struct az_state_list *list, const int from, const int pairCode) {
+ int i;
+ struct az_state_list s_ret_list;
+ struct az_state_list *ret_list = &s_ret_list;
+ if (!az_state_list_init(ret_list, list->size)) {
+ return 0;
+ }
+ for (i = 0; i < list->used; i++) {
+ if (!az_UpdateStateForPair(list->states + i, from, pairCode, ret_list)) {
+ az_state_list_free(ret_list);
+ return 0;
+ }
+ }
+ az_SimplifyStates(ret_list);
+
+ az_state_list_free(list);
+ list->states = ret_list->states;
+ list->size = ret_list->size;
+ list->used = ret_list->used;
+
+ return 1;
+}
+
+/* Update a set of states for a new character by updating each state for the new character, merging the results,
+ and then removing the non-optimal states */
+static int az_UpdateStateListForChar(struct az_state_list *list, const unsigned char *source, const int from,
+ const int gs1) {
+ int i;
+ struct az_state_list s_ret_list;
+ struct az_state_list *ret_list = &s_ret_list;
+ if (!az_state_list_init(ret_list, list->size)) {
+ return 0;
+ }
+ for (i = 0; i < list->used; i++) {
+ if (!az_UpdateStateForChar(list->states + i, source, from, gs1, ret_list)) {
+ az_state_list_free(ret_list);
+ return 0;
+ }
+ }
+ if (ret_list->used > 1) {
+ az_SimplifyStates(ret_list);
+ }
+
+ az_state_list_free(list);
+ list->states = ret_list->states;
+ list->size = ret_list->size;
+ list->used = ret_list->used;
+
+ return 1;
+}
+
+/* Default, optimized encodation algorithm by Frank Yellin and Rustam Abdullaev, adapted from ZXing via zxing-cpp's
+ `HighLevelEncoder::Encode()` & slightly improved */
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Note that a bitstream that is encoded to be shortest based on mode choices may not be so after bit-stuffing */
+static int az_binary_string(unsigned char source[], const int length, int bp,
+ char binary_string[AZTEC_MAP_POSN_MAX + 1], const int gs1, const char initial_mode,
+ char *p_current_mode) {
+ struct az_state_list s_state_list;
+ struct az_state_list *list = &s_state_list;
+ struct az_state stateEnd;
+ int minStateIdx = -1;
+ int minBitCount = INT_MAX;
+ int i;
+#ifndef NDEBUG
+ const int entry_bp = bp;
+#endif
+
+ if (!az_state_list_init(list, length)) {
+ return 0;
+ }
+ memset(list->states, 0, sizeof(struct az_state));
+ list->states[list->used++].mode = initial_mode;
+
+ for (i = 0; i < length; i++) {
+#ifdef AZ_DEBUG_LIST
+ fprintf(stderr, "index %d\n", (int) i);
+#endif
+ if (AZ_DOUBLE_PUNCT(source, length, i)) {
+ /* "\r\n" -> 2, ". " -> 3, ", " -> 4, ": " -> 5 */
+ const int pairCode = source[i] == '\r' ? 2 : 3 + 7 - ((source[i] & 0x0F) >> 1);
+ if (!az_UpdateStateListForPair(list, i, pairCode)) {
+ az_state_list_free(list);
+ return 0;
}
+ i++;
} else {
- if (debug_print) printf("edges[%d][%d][0] NULL\n", length, j);
- }
- }
- assert(minimalJ >= 0);
-
- edge = edges + v_i + minimalJ;
- mode_len = 0;
- mode_end = length;
- while (edge) {
- const char current_mode = edge->mode;
- mode_len += edge->len;
- edge = AZ_PREVIOUS(edges, edge);
- if (!edge || edge->mode != current_mode) {
- for (i = mode_end - mode_len; i < mode_end; i++) {
- modes[i] = current_mode;
+ if (!az_UpdateStateListForChar(list, source, i, gs1)) {
+ az_state_list_free(list);
+ return 0;
}
- mode_end = mode_end - mode_len;
- mode_len = 0;
}
}
+ az_dump_list(list, "End ");
- reduced_length = az_reduce(modes, source, length);
-
- if (debug_print) {
- printf(" Modes (%d):\n", reduced_length);
- az_print_modes(modes, reduced_length);
+ for (i = 0; i < list->used; i++) {
+ if (list->states[i].bitCount < minBitCount) {
+ minStateIdx = i;
+ minBitCount = list->states[i].bitCount;
+ }
}
- assert(mode_end == 0);
+ assert(minStateIdx >= 0);
- free(edges);
+ if (!az_EndByteShift(list->states + minStateIdx, &stateEnd, length)) {
+ az_state_free(&stateEnd);
+ az_state_list_free(list);
+ return 0;
+ }
- return reduced_length;
+ if (stateEnd.bitCount > AZTEC_BIN_CAPACITY) {
+ az_state_free(&stateEnd);
+ az_state_list_free(list);
+ return stateEnd.bitCount;
+ }
+
+ for (i = 0; i < stateEnd.tokens.used; i++) {
+ const struct az_token *token = stateEnd.tokens.tokens + i;
+ const int count = token->count;
+ if (count < 0) {
+ bp = z_bin_append_posn(token->value, -count, binary_string, bp);
+ } else {
+ int j;
+ for (j = 0; j < count; j++) {
+ if (j == 0 || (j == 31 && count <= 62)) {
+ bp = z_bin_append_posn(31, 5, binary_string, bp); /* B/S */
+ if (count > 62) {
+ bp = z_bin_append_posn(count - 31, 16, binary_string, bp);
+ } else if (j == 0) {
+ bp = z_bin_append_posn(count <= 31 ? count : 31, 5, binary_string, bp);
+ } else {
+ bp = z_bin_append_posn(count - 31, 5, binary_string, bp);
+ }
+ }
+ bp = z_bin_append_posn(source[token->value + j], 8, binary_string, bp);
+ }
+ }
+ }
+ assert(bp - entry_bp == stateEnd.bitCount);
+
+ *p_current_mode = stateEnd.mode;
+
+ az_state_free(&stateEnd);
+ az_state_list_free(list);
+
+ return bp;
}
/* Calculate the binary size */
@@ -877,11 +1075,16 @@ static int az_text_size(const char *modes, const unsigned char *source, int leng
const int eci, const char initial_mode, const int eci_latch, int *byte_counts) {
int i;
int byte_i = 0;
- char current_mode;
+ char current_mode = initial_mode;
int size = 0;
if (set_gs1 && gs1) {
- size += 5 + 5 + 3;
+ if (eci == 0) {
+ current_mode = AZ_D;
+ size += 5 + 4 + 5 + 3;
+ } else {
+ size += 5 + 5 + 3;
+ }
}
if (eci != 0) {
if (initial_mode != AZ_P) {
@@ -893,57 +1096,26 @@ static int az_text_size(const char *modes, const unsigned char *source, int leng
size += 5;
}
size += 5;
+ current_mode = AZ_P;
} else {
size += initial_mode == AZ_D ? 4 : 5;
}
}
size += 5 + 3 + 4 + 4 * ((eci > 9) + (eci > 99) + (eci > 999) + (eci > 9999) + (eci > 99999));
}
- current_mode = eci_latch ? AZ_P : initial_mode;
for (i = 0; i < length; i++) {
- int current_mode_set = 0;
if (modes[i] != current_mode) {
/* Change mode */
- const char mask_mode = AZ_MASK(modes[i]);
+ const int mask_mode = AZ_MASK(modes[i]);
if (mask_mode != current_mode) {
- size += 4 + (current_mode != AZ_D);
- }
- if (current_mode == AZ_U) {
- if (mask_mode == AZ_P) {
- size += 5;
- }
- } else if (current_mode == AZ_L) {
- if (mask_mode == AZ_P) {
- size += 5;
- } else if (mask_mode == AZ_U) {
- size += 4;
- }
- } else if (current_mode == AZ_M) {
- if (mask_mode == AZ_D) {
- size += 5;
- }
- } else if (current_mode == AZ_P) {
- if (mask_mode != AZ_U) {
- size += 5;
- if (mask_mode == AZ_B) {
- current_mode = AZ_U;
- current_mode_set = 1;
- }
- }
- } else if (current_mode == AZ_D) {
- if (mask_mode == AZ_L || mask_mode == AZ_M) {
- size += 5;
- } else if (mask_mode == AZ_P) {
- size += 5 + 5;
- } else if (mask_mode == AZ_B) {
- size += 5;
+ size += AztecLatchNum[(int) current_mode][mask_mode];
+ if (mask_mode != AZ_B) {
+ current_mode = mask_mode;
+ } else if (current_mode == AZ_P || current_mode == AZ_D) {
current_mode = AZ_U;
- current_mode_set = 1;
}
}
- if (modes[i] & AZ_PS) {
- size += 4 + (mask_mode != AZ_D);
- } else if (modes[i] & AZ_US) {
+ if (modes[i] & (AZ_PS | AZ_US)) {
size += 4 + (mask_mode != AZ_D);
}
@@ -955,7 +1127,7 @@ static int az_text_size(const char *modes, const unsigned char *source, int leng
if (count > 2047 + 2078) { /* Can't be more than 19968 / 8 = 2496 */
return 0;
}
- byte_counts[byte_i++] = count;
+ byte_counts[byte_i++] = (short) count;
if (count > 2047) { /* Max 11-bit number */
big_batch = count > 2078 ? 2078 : count;
@@ -968,11 +1140,17 @@ static int az_text_size(const char *modes, const unsigned char *source, int leng
if (big_batch) {
size += 5;
}
- if (count > 31) {
+ if (count > 62) {
assert(count <= 2078);
/* Put 00000 followed by 11-bit number of bytes less 31 */
size += 16;
} else {
+ if (count > 31) {
+ /* 2 5-bit B/Ss beats 1 11-bit */
+ size += 10 + (31 << 3);
+ count -= 31;
+ i += 31;
+ }
/* Put 5-bit number of bytes */
size += 5;
}
@@ -982,21 +1160,17 @@ static int az_text_size(const char *modes, const unsigned char *source, int leng
i--;
continue;
}
-
- if (current_mode != mask_mode && !current_mode_set) {
- current_mode = mask_mode;
- }
}
- if (modes[i] == AZ_U || (modes[i] & AZ_US) || modes[i] == AZ_L || modes[i] == AZ_M) {
- size += 5;
- } else if (modes[i] == AZ_P || (modes[i] & AZ_PS)) {
+ if (modes[i] == AZ_P || (modes[i] & AZ_PS)) {
size += 5;
if (gs1 && source[i] == '\x1D') {
size += 3;
}
- } else if (modes[i] == AZ_D) {
+ } else if (modes[i] == AZ_D && !(modes[i] & AZ_US)) {
size += 4;
+ } else {
+ size += 5;
}
}
@@ -1006,51 +1180,46 @@ static int az_text_size(const char *modes, const unsigned char *source, int leng
/* Determine encoding modes and encode */
static int az_text_process(unsigned char *source, int length, int bp, char *binary_string, const int gs1,
const int gs1_bp, const int eci, const int fast_encode, char *p_current_mode, int *data_length,
- const int debug_print) {
+ const int debug) {
int i, j;
- char current_mode;
- int reduced_length;
+ int reduced_length = 0; /* Suppress gcc-14 warning -Wmaybe-uninitialized */
char *modes = (char *) z_alloca(length + 1);
int *byte_counts = (int *) z_alloca(sizeof(int) * length); /* Cache of Byte-run counts */
int byte_i = 0;
- int size;
+ int size = 0;
int eci_latch = 0;
- const char initial_mode = p_current_mode ? *p_current_mode : AZ_U;
+ char current_mode = p_current_mode ? *p_current_mode : AZ_U;
+ const char initial_mode = current_mode;
const int set_gs1 = bp == gs1_bp;
- const int all_byte_only_or_uld = az_all_byte_only_or_uld(source, length);
-#ifndef NDEBUG
const int initial_bp = bp;
+ const int all_byte_only_or_uld = az_all_byte_only_or_uld(source, length); /* -1 if not */
+ const int debug_print = debug & ZINT_DEBUG_PRINT;
+#ifdef ZINT_TEST
+ const int debug_skip_all = debug & 2048; /* ZINT_DEBUG_TEST_AZTEC_SKIP_ALL - skip using `all_byte_only_or_uld` */
+#else
+ const int debug_skip_all = 0;
#endif
- /* See if it's worthwhile latching to AZ_P when have ECI */
- if (!all_byte_only_or_uld && eci && initial_mode != AZ_P && az_count_initial_puncts(source, length)
- > 2 + (initial_mode == AZ_D)) {
- assert(!gs1);
- eci_latch = 1;
- }
-
- if (all_byte_only_or_uld) {
- memset(modes, all_byte_only_or_uld, length);
- reduced_length = length;
- } else if (fast_encode) {
- reduced_length = az_text_modes(modes, source, length, gs1, eci_latch ? AZ_P : initial_mode, debug_print);
- } else {
- reduced_length = az_define_modes(modes, source, length, gs1, eci_latch ? AZ_P : initial_mode, debug_print);
- }
-
- size = az_text_size(modes, source, reduced_length, gs1, set_gs1, eci, initial_mode, eci_latch, byte_counts);
- if (size == 0 || bp + size > AZTEC_BIN_CAPACITY) {
- return 0;
- }
-
if (set_gs1 && gs1) {
assert(initial_mode == AZ_U);
- bp = z_bin_append_posn(0, 5, binary_string, bp); /* P/S */
- bp = z_bin_append_posn(0, 5, binary_string, bp); /* FLG(n) */
- bp = z_bin_append_posn(0, 3, binary_string, bp); /* FLG(0) */
+ if (eci == 0) {
+ /* Latch to D/L to save a bit */
+ current_mode = AZ_D;
+ bp = z_bin_append_posn(30, 5, binary_string, bp); /* D/L */
+ bp = z_bin_append_posn(0, 4 + 5 + 3, binary_string, bp); /* P/S FLG(0) = FNC1 */
+ } else {
+ bp = z_bin_append_posn(0, 5 + 5 + 3, binary_string, bp); /* P/S FLG(0) = FNC1 */
+ }
+ /* See if it's worthwhile latching to AZ_P when have ECI */
+ } else if ((debug_skip_all || all_byte_only_or_uld == -1) && eci && initial_mode != AZ_P
+ && az_count_initial_puncts(source, length) > 2 + (initial_mode == AZ_D)) {
+ assert(!gs1);
+ eci_latch = 1;
+ current_mode = AZ_P;
}
if (eci != 0) {
+ const int flg = 1 + (eci > 9) + (eci > 99) + (eci > 999) + (eci > 9999) + (eci > 99999);
if (initial_mode != AZ_P) {
if (eci_latch) {
if (initial_mode != AZ_M) {
@@ -1064,224 +1233,134 @@ static int az_text_process(unsigned char *source, int length, int bp, char *bina
bp = z_bin_append_posn(0, initial_mode == AZ_D ? 4 : 5, binary_string, bp); /* P/S */
}
}
- bp = z_bin_append_posn(0, 5, binary_string, bp); /* FLG(n) */
- if (eci <= 9) {
- bp = z_bin_append_posn(1, 3, binary_string, bp); /* FLG(1) */
+ bp = z_bin_append_posn(flg, 5 + 3, binary_string, bp); /* FLG(n) */
+ if (flg == 1) {
bp = z_bin_append_posn(2 + eci, 4, binary_string, bp);
- } else if (eci <= 99) {
- bp = z_bin_append_posn(2, 3, binary_string, bp); /* FLG(2) */
- bp = z_bin_append_posn(2 + (eci / 10), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + (eci % 10), 4, binary_string, bp);
- } else if (eci <= 999) {
- bp = z_bin_append_posn(3, 3, binary_string, bp); /* FLG(3) */
- bp = z_bin_append_posn(2 + (eci / 100), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + ((eci % 100) / 10), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + (eci % 10), 4, binary_string, bp);
- } else if (eci <= 9999) {
- bp = z_bin_append_posn(4, 3, binary_string, bp); /* FLG(4) */
- bp = z_bin_append_posn(2 + (eci / 1000), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + ((eci % 1000) / 100), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + ((eci % 100) / 10), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + (eci % 10), 4, binary_string, bp);
- } else if (eci <= 99999) {
- bp = z_bin_append_posn(5, 3, binary_string, bp); /* FLG(5) */
- bp = z_bin_append_posn(2 + (eci / 10000), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + ((eci % 10000) / 1000), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + ((eci % 1000) / 100), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + ((eci % 100) / 10), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + (eci % 10), 4, binary_string, bp);
+ } else if (flg == 2) {
+ bp = z_bin_append_posn(((2 + eci / 10) << 4) + 2 + eci % 10, 8, binary_string, bp);
+ } else if (flg == 3) {
+ bp = z_bin_append_posn(2 + eci / 100, 4, binary_string, bp);
+ bp = z_bin_append_posn(((2 + eci % 100 / 10) << 4) + 2 + eci % 10, 8, binary_string, bp);
+ } else if (flg == 4) {
+ bp = z_bin_append_posn(((2 + eci / 1000) << 4) + 2 + eci % 1000 / 100, 8, binary_string, bp);
+ bp = z_bin_append_posn(((2 + eci % 100 / 10) << 4) + 2 + eci % 10, 8, binary_string, bp);
+ } else if (flg == 5) {
+ bp = z_bin_append_posn(2 + eci / 10000, 4, binary_string, bp);
+ bp = z_bin_append_posn(((2 + eci % 10000 / 1000) << 4) + 2 + eci % 1000 / 100, 8, binary_string, bp);
+ bp = z_bin_append_posn(((2 + eci % 100 / 10) << 4) + 2 + eci % 10, 8, binary_string, bp);
} else {
- bp = z_bin_append_posn(6, 3, binary_string, bp); /* FLG(6) */
- bp = z_bin_append_posn(2 + (eci / 100000), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + ((eci % 100000) / 10000), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + ((eci % 10000) / 1000), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + ((eci % 1000) / 100), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + ((eci % 100) / 10), 4, binary_string, bp);
- bp = z_bin_append_posn(2 + (eci % 10), 4, binary_string, bp);
+ bp = z_bin_append_posn(((2 + eci / 100000) << 4) + 2 + eci % 100000 / 10000, 8, binary_string, bp);
+ bp = z_bin_append_posn(((2 + eci % 10000 / 1000) << 4) + 2 + eci % 1000 / 100, 8, binary_string, bp);
+ bp = z_bin_append_posn(((2 + eci % 100 / 10) << 4) + 2 + eci % 10, 8, binary_string, bp);
}
}
- current_mode = eci_latch ? AZ_P : initial_mode;
- for (i = 0; i < reduced_length; i++) {
- int current_mode_set = 0;
- if (modes[i] != current_mode) {
- /* Change mode */
- const char mask_mode = AZ_MASK(modes[i]);
- if (current_mode == AZ_U) {
- if (mask_mode == AZ_L) {
- bp = z_bin_append_posn(28, 5, binary_string, bp); /* L/L */
- } else if (mask_mode == AZ_M) {
- bp = z_bin_append_posn(29, 5, binary_string, bp); /* M/L */
- } else if (mask_mode == AZ_P) {
- bp = z_bin_append_posn(29, 5, binary_string, bp); /* M/L */
- bp = z_bin_append_posn(30, 5, binary_string, bp); /* P/L */
- } else if (mask_mode == AZ_D) {
- bp = z_bin_append_posn(30, 5, binary_string, bp); /* D/L */
- } else if (mask_mode == AZ_B) {
- bp = z_bin_append_posn(31, 5, binary_string, bp); /* B/S */
- }
- } else if (current_mode == AZ_L) {
- if (mask_mode == AZ_U) {
- bp = z_bin_append_posn(30, 5, binary_string, bp); /* D/L */
- bp = z_bin_append_posn(14, 4, binary_string, bp); /* U/L */
- } else if (mask_mode == AZ_M) {
- bp = z_bin_append_posn(29, 5, binary_string, bp); /* M/L */
- } else if (mask_mode == AZ_P) {
- bp = z_bin_append_posn(29, 5, binary_string, bp); /* M/L */
- bp = z_bin_append_posn(30, 5, binary_string, bp); /* P/L */
- } else if (mask_mode == AZ_D) {
- bp = z_bin_append_posn(30, 5, binary_string, bp); /* D/L */
- } else if (mask_mode == AZ_B) {
- bp = z_bin_append_posn(31, 5, binary_string, bp); /* B/S */
- }
- } else if (current_mode == AZ_M) {
- if (mask_mode == AZ_U) {
- bp = z_bin_append_posn(29, 5, binary_string, bp); /* U/L */
- } else if (mask_mode == AZ_L) {
- bp = z_bin_append_posn(28, 5, binary_string, bp); /* L/L */
- } else if (mask_mode == AZ_P) {
- bp = z_bin_append_posn(30, 5, binary_string, bp); /* P/L */
- } else if (mask_mode == AZ_D) {
- bp = z_bin_append_posn(29, 5, binary_string, bp); /* U/L */
- bp = z_bin_append_posn(30, 5, binary_string, bp); /* D/L */
- } else if (mask_mode == AZ_B) {
- bp = z_bin_append_posn(31, 5, binary_string, bp); /* B/S */
- }
- } else if (current_mode == AZ_P) {
- if (mask_mode != current_mode) {
- bp = z_bin_append_posn(31, 5, binary_string, bp); /* U/L */
- if (mask_mode == AZ_L) {
- bp = z_bin_append_posn(28, 5, binary_string, bp); /* L/L */
- } else if (mask_mode == AZ_M) {
- bp = z_bin_append_posn(29, 5, binary_string, bp); /* M/L */
- } else if (mask_mode == AZ_D) {
- bp = z_bin_append_posn(30, 5, binary_string, bp); /* D/L */
- } else if (mask_mode == AZ_B) {
- current_mode = AZ_U;
- current_mode_set = 1;
- bp = z_bin_append_posn(31, 5, binary_string, bp); /* B/S */
- }
- }
- } else if (current_mode == AZ_D) {
- if (mask_mode != current_mode) {
- bp = z_bin_append_posn(14, 4, binary_string, bp); /* U/L */
- if (mask_mode == AZ_L) {
- bp = z_bin_append_posn(28, 5, binary_string, bp); /* L/L */
- } else if (mask_mode == AZ_M) {
- bp = z_bin_append_posn(29, 5, binary_string, bp); /* M/L */
- } else if (mask_mode == AZ_P) {
- bp = z_bin_append_posn(29, 5, binary_string, bp); /* M/L */
- bp = z_bin_append_posn(30, 5, binary_string, bp); /* P/L */
- } else if (mask_mode == AZ_B) {
- current_mode = AZ_U;
- current_mode_set = 1;
- bp = z_bin_append_posn(31, 5, binary_string, bp); /* B/S */
- }
- }
- }
- if (modes[i] & AZ_PS) {
- assert(mask_mode != AZ_P);
- bp = z_bin_append_posn(0, 4 + (mask_mode != AZ_D), binary_string, bp); /* P/S */
- } else if (modes[i] & AZ_US) {
- assert(mask_mode == AZ_L || mask_mode == AZ_D);
- if (mask_mode == AZ_L) {
- bp = z_bin_append_posn(28, 5, binary_string, bp); /* U/S */
- } else {
- bp = z_bin_append_posn(15, 4, binary_string, bp); /* U/S */
- }
- }
+ if (!debug_skip_all && all_byte_only_or_uld != -1) {
+ memset(modes, all_byte_only_or_uld, length);
+ reduced_length = length;
+ } else if (fast_encode) {
+ reduced_length = az_text_modes(modes, source, length, gs1, current_mode, debug_print);
+ } else {
+ bp = az_binary_string(source, length, bp, binary_string, gs1, current_mode, ¤t_mode);
+ if (bp == 0 || bp > AZTEC_BIN_CAPACITY) {
+ return bp == 0 ? ZINT_ERROR_MEMORY : ZINT_ERROR_TOO_LONG;
+ }
+ assert(bp > initial_bp);
+ size = bp - initial_bp;
+ }
- /* Byte mode - process full block here */
- if (modes[i] == AZ_B) {
- int big_batch = 0;
- int count = byte_counts[byte_i++];
-
- assert(count <= 2047 + 2078); /* Can't be more than 19968 / 8 = 2496 */
-
- if (count > 2047) { /* Max 11-bit number */
- big_batch = count > 2078 ? 2078 : count;
- /* Put 00000 followed by 11-bit number of bytes less 31 */
- bp = z_bin_append_posn(big_batch - 31, 16, binary_string, bp);
- for (j = 0; j < big_batch; j++) {
- bp = z_bin_append_posn(source[i++], 8, binary_string, bp);
- }
- count -= big_batch;
- }
- if (count) {
- if (big_batch) {
- bp = z_bin_append_posn(31, 5, binary_string, bp); /* B/S */
- }
- if (count > 31) {
- assert(count <= 2078);
- /* Put 00000 followed by 11-bit number of bytes less 31 */
- bp = z_bin_append_posn(count - 31, 16, binary_string, bp);
- } else {
- /* Put 5-bit number of bytes */
- bp = z_bin_append_posn(count, 5, binary_string, bp);
- }
- for (j = 0; j < count; j++) {
- bp = z_bin_append_posn(source[i++], 8, binary_string, bp);
- }
- }
- i--;
- continue;
- }
-
- if (current_mode != mask_mode && !current_mode_set) {
- current_mode = mask_mode;
- }
+ if (!size) {
+ size = az_text_size(modes, source, reduced_length, gs1, set_gs1, eci, initial_mode, eci_latch, byte_counts);
+ if (size == 0 || bp + size > AZTEC_BIN_CAPACITY) {
+ return ZINT_ERROR_TOO_LONG;
}
- if (modes[i] == AZ_U || (modes[i] & AZ_US)) {
- if (source[i] == ' ') {
- bp = z_bin_append_posn(1, 5, binary_string, bp); /* SP */
- } else {
- bp = z_bin_append_posn(AztecSymbolChar[source[i]], 5, binary_string, bp);
+ for (i = 0; i < reduced_length; i++) {
+ int current_mode_set = 0;
+ if (modes[i] != current_mode) {
+ /* Change mode */
+ const int mask_mode = AZ_MASK(modes[i]);
+ if (current_mode != mask_mode) {
+ assert(current_mode != AZ_B); /* Suppress clang-tidy-22 clang-analyzer-security.ArrayBound */
+ bp = z_bin_append_posn(AztecLatch[(int) current_mode][mask_mode],
+ AztecLatchNum[(int) current_mode][mask_mode], binary_string, bp);
+ if (mask_mode == AZ_B && (current_mode == AZ_P || current_mode == AZ_D)) {
+ current_mode = AZ_U;
+ current_mode_set = 1;
+ }
+ }
+ if (modes[i] & AZ_PS) {
+ assert(mask_mode != AZ_P);
+ bp = z_bin_append_posn(0, 4 + (mask_mode != AZ_D), binary_string, bp); /* P/S */
+ } else if (modes[i] & AZ_US) {
+ assert(mask_mode == AZ_L || mask_mode == AZ_D);
+ if (mask_mode == AZ_L) {
+ bp = z_bin_append_posn(28, 5, binary_string, bp); /* U/S */
+ } else {
+ bp = z_bin_append_posn(15, 4, binary_string, bp); /* U/S */
+ }
+ }
+
+ /* Byte mode - process full block here */
+ if (modes[i] == AZ_B) {
+ int big_batch = 0;
+ int count = byte_counts[byte_i++];
+
+ assert(count <= 2047 + 2078); /* Can't be more than 19968 / 8 = 2496 */
+
+ if (count > 2047) { /* Max 11-bit number */
+ big_batch = count > 2078 ? 2078 : count;
+ /* Put 00000 followed by 11-bit number of bytes less 31 */
+ bp = z_bin_append_posn(big_batch - 31, 16, binary_string, bp);
+ for (j = 0; j < big_batch; j++) {
+ bp = z_bin_append_posn(source[i++], 8, binary_string, bp);
+ }
+ count -= big_batch;
+ }
+ if (count) {
+ if (big_batch) {
+ bp = z_bin_append_posn(31, 5, binary_string, bp); /* B/S */
+ }
+ if (count > 62) {
+ assert(count <= 2078);
+ /* Put 00000 followed by 11-bit number of bytes less 31 */
+ bp = z_bin_append_posn(count - 31, 16, binary_string, bp);
+ } else {
+ if (count > 31) {
+ /* 2 5-bit B/Ss beats 1 11-bit */
+ bp = z_bin_append_posn(31, 5, binary_string, bp); /* 5-bit byte count */
+ for (j = 0; j < 31; j++) {
+ bp = z_bin_append_posn(source[i++], 8, binary_string, bp);
+ }
+ bp = z_bin_append_posn(31, 5, binary_string, bp); /* B/S */
+ count -= 31;
+ }
+ /* Put 5-bit number of bytes */
+ bp = z_bin_append_posn(count, 5, binary_string, bp);
+ }
+ for (j = 0; j < count; j++) {
+ bp = z_bin_append_posn(source[i++], 8, binary_string, bp);
+ }
+ }
+ i--;
+ continue;
+ }
+
+ if (current_mode != mask_mode && !current_mode_set) {
+ current_mode = mask_mode;
+ }
}
- } else if (modes[i] == AZ_L) {
- if (source[i] == ' ') {
- bp = z_bin_append_posn(1, 5, binary_string, bp); /* SP */
+
+ if (modes[i] == AZ_P || (modes[i] & AZ_PS)) {
+ if (gs1 && source[i] == '\x1D') {
+ bp = z_bin_append_posn(0, 5 + 3, binary_string, bp); /* FLG(0) = FNC1 */
+ } else {
+ bp = z_bin_append_posn(AztecChar[AZ_P][source[i]], 5, binary_string, bp);
+ }
} else {
- bp = z_bin_append_posn(AztecSymbolChar[source[i]], 5, binary_string, bp);
- }
- } else if (modes[i] == AZ_M) {
- if (source[i] == ' ') {
- bp = z_bin_append_posn(1, 5, binary_string, bp); /* SP */
- } else if (source[i] == '\r') {
- bp = z_bin_append_posn(14, 5, binary_string, bp); /* CR */
- } else {
- bp = z_bin_append_posn(AztecSymbolChar[source[i]], 5, binary_string, bp);
- }
- } else if (modes[i] == AZ_P || (modes[i] & AZ_PS)) {
- if (gs1 && source[i] == '\x1D') {
- bp = z_bin_append_posn(0, 5, binary_string, bp); /* FLG(n) */
- bp = z_bin_append_posn(0, 3, binary_string, bp); /* FLG(0) = FNC1 */
- } else if (source[i] == '\r') {
- bp = z_bin_append_posn(1, 5, binary_string, bp); /* CR */
- } else if (source[i] == 'a') {
- bp = z_bin_append_posn(2, 5, binary_string, bp); /* CR LF */
- } else if (source[i] == 'b') {
- bp = z_bin_append_posn(3, 5, binary_string, bp); /* . SP */
- } else if (source[i] == 'c') {
- bp = z_bin_append_posn(4, 5, binary_string, bp); /* , SP */
- } else if (source[i] == 'd') {
- bp = z_bin_append_posn(5, 5, binary_string, bp); /* : SP */
- } else if (source[i] == ',') {
- bp = z_bin_append_posn(17, 5, binary_string, bp); /* Comma */
- } else if (source[i] == '.') {
- bp = z_bin_append_posn(19, 5, binary_string, bp); /* Full stop */
- } else {
- bp = z_bin_append_posn(AztecSymbolChar[source[i]], 5, binary_string, bp);
- }
- } else if (modes[i] == AZ_D) {
- if (source[i] == ' ') {
- bp = z_bin_append_posn(1, 4, binary_string, bp); /* SP */
- } else if (source[i] == ',') {
- bp = z_bin_append_posn(12, 4, binary_string, bp); /* Comma */
- } else if (source[i] == '.') {
- bp = z_bin_append_posn(13, 4, binary_string, bp); /* Full stop */
- } else {
- bp = z_bin_append_posn(AztecSymbolChar[source[i]], 4, binary_string, bp);
+ const int char_mode = (modes[i] & AZ_US) ? AZ_U : modes[i];
+ assert(char_mode != AZ_B); /* Suppress clang-tidy-22 clang-analyzer-security.ArrayBound */
+ bp = z_bin_append_posn(AztecChar[char_mode][source[i]], 4 + (modes[i] != AZ_D), binary_string, bp);
}
}
}
@@ -1297,12 +1376,12 @@ static int az_text_process(unsigned char *source, int length, int bp, char *bina
assert(size == bp - initial_bp);
- return 1;
+ return 0;
}
/* Call `az_text_process()` for each segment */
static int az_text_process_segs(struct zint_symbol *symbol, struct zint_seg segs[], const int seg_count, int bp,
- char binary_string[], const int gs1, const int gs1_bp, int *data_length, const int debug_print) {
+ char binary_string[], const int gs1, const int gs1_bp, int *data_length) {
int i;
char current_mode = AZ_U;
const int fast_encode = symbol->input_mode & FAST_MODE;
@@ -1311,9 +1390,10 @@ static int az_text_process_segs(struct zint_symbol *symbol, struct zint_seg segs
const int content_segs = !gs1 && (symbol->output_options & BARCODE_CONTENT_SEGS);
for (i = 0; i < seg_count; i++) {
- if (!az_text_process(segs[i].source, segs[i].length, bp, binary_string, gs1, gs1_bp, segs[i].eci, fast_encode,
- ¤t_mode, &bp, debug_print)) {
- return ZINT_ERROR_TOO_LONG; /* `az_text_process()` only fails with too long */
+ int error_number;
+ if ((error_number = az_text_process(segs[i].source, segs[i].length, bp, binary_string, gs1, gs1_bp,
+ segs[i].eci, fast_encode, ¤t_mode, &bp, symbol->debug))) {
+ return error_number;
}
if (content_segs && segs[i].eci) {
z_ct_set_seg_eci(symbol, i, segs[i].eci);
@@ -1510,6 +1590,10 @@ INTERNAL int zint_aztec(struct zint_symbol *symbol, struct zint_seg segs[], cons
float ecc_ratio;
int dim;
+ if ((i = z_segs_length(segs, seg_count)) > 4981) { /* Max is 4981 digits */
+ return z_errtxtf(ZINT_ERROR_TOO_LONG, symbol, 803, "Input length %d too long (maximum 4981)", i);
+ }
+
if (gs1 && reader_init) {
return z_errtxt(ZINT_ERROR_INVALID_OPTION, symbol, 501, "Cannot use Reader Initialisation in GS1 mode");
}
@@ -1555,19 +1639,19 @@ INTERNAL int zint_aztec(struct zint_symbol *symbol, struct zint_seg segs[], cons
}
(void) az_text_process(sa_src, sa_len, bp, binary_string, 0 /*gs1*/, 0 /*gs1_bp*/, 0 /*eci*/,
- 0 /*fast_encode*/, NULL /*p_current_mode*/, &bp, debug_print);
+ 0 /*fast_encode*/, NULL /*p_current_mode*/, &bp, symbol->debug);
/* Will be in U/L due to uppercase A-Z index/count indicators at end */
gs1_bp = bp; /* Initial FNC1 (FLG0) position */
}
- if ((error_number = az_text_process_segs(symbol, segs, seg_count, bp, binary_string, gs1, gs1_bp, &data_length,
- debug_print))) {
+ if ((error_number = az_text_process_segs(symbol, segs, seg_count, bp, binary_string, gs1, gs1_bp,
+ &data_length))) {
assert(error_number == ZINT_ERROR_TOO_LONG || error_number == ZINT_ERROR_MEMORY);
if (error_number == ZINT_ERROR_TOO_LONG) {
return z_errtxt(error_number, symbol, 502,
"Input too long, requires too many codewords (maximum " AZ_BIN_CAP_CWDS_S ")");
}
- return error_number;
+ return z_errtxt(error_number, symbol, 804, "Insufficient memory for optimized encodation");
}
assert(data_length > 0); /* Suppress clang-tidy warning: clang-analyzer-core.UndefinedBinaryOperatorResult */
diff --git a/backend/aztec.h b/backend/aztec.h
index a9ffd149..ea0527fd 100644
--- a/backend/aztec.h
+++ b/backend/aztec.h
@@ -84,31 +84,19 @@ static const short AztecMapCore[15][15] = {
{ 0, 0, 20029, 20028, 20027, 20026, 20025, 0, 20024, 20023, 20022, 20021, 20020, 0, 0, },
};
-/* From Table 2 */
-static const char AztecSymbolChar[128] = {
- 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 15, 16, 17, 18, 19,
- 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 18, 0, 20,
- 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 22, 23, 24, 25, 26,
- 20, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 27, 21, 28, 22, 23,
- 24, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 25, 30, 26, 27
-};
-
/* Modes */
-#define AZ_U 1
-#define AZ_L 2
-#define AZ_M 3
-#define AZ_P 4
-#define AZ_D 5
-#define AZ_B 6 /* 5 or 11-bit Byte (ideally would be separate modes, but not done due to performance hit) */
+#define AZ_U 0
+#define AZ_L 1
+#define AZ_M 2
+#define AZ_P 3
+#define AZ_D 4
/* Pseudo-modes */
-#define AZ_X 7 /* Used to indicate chars belonging to more than one mode */
-#define AZ_E 8 /* Used to signal no next mode */
+#define AZ_B 5 /* Byte */
+#define AZ_X 6 /* Indicates chars belonging to more than one mode */
+#define AZ_E 7 /* Signals no next mode */
-#define AZ_NUM_MODES 6
+#define AZ_NUM_MODES 5
#define AZ_MASK(m) ((m) & 0x0F)
@@ -126,22 +114,22 @@ static const char AztecSymbolChar[128] = {
#define AZ_D_US (AZ_D | AZ_US)
static const char AztecModes[128] = {
- AZ_B, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_X, AZ_B, AZ_B,
- AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M,
- AZ_X, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_X, AZ_P, AZ_X, AZ_P,
- AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P,
- AZ_M, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U,
- AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_P, AZ_M, AZ_P, AZ_M, AZ_M,
- AZ_M, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L,
- AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_P, AZ_M, AZ_P, AZ_M, AZ_M
+ AZ_B, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, AZ_X, AZ_B, AZ_B, /*0-15*/
+ AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_B, AZ_M, AZ_M, AZ_M, AZ_M, AZ_M, /*16-31*/
+ AZ_X, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_X, AZ_P, AZ_X, AZ_P, /*32-47*/
+ AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_D, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, AZ_P, /*48-63*/
+ AZ_M, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, /*64-79*/
+ AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_U, AZ_P, AZ_M, AZ_P, AZ_M, AZ_M, /*80-95*/
+ AZ_M, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, /*96-111*/
+ AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_L, AZ_P, AZ_M, AZ_P, AZ_M, AZ_M /*112-127*/
};
/* Testable flags */
-#define AZ_U_F 0x01
-#define AZ_L_F 0x02
-#define AZ_M_F 0x04
-#define AZ_P_F 0x08
-#define AZ_D_F 0x10
+#define AZ_U_F 0x01 /* 1 << AZ_U */
+#define AZ_L_F 0x02 /* 1 << AZ_L */
+#define AZ_M_F 0x04 /* 1 << AZ_M */
+#define AZ_P_F 0x08 /* 1 << AZ_P */
+#define AZ_D_F 0x10 /* 1 << AZ_D */
/* Flag version of `AztecModes[]` */
static const char AztecFlags[128] = {
@@ -179,6 +167,86 @@ static const char AztecFlags[128] = {
AZ_M_F, AZ_P_F, AZ_M_F, AZ_M_F, /* 124-127*/
};
+/* The number of bits latch takes (AZ_B column used in FAST_MODE only) */
+static const char AztecLatchNum[5][6] = {
+ /* U L M P D B */
+ /*U*/ { 0, 5, 5, 10, 5, 5 },
+ /*L*/ { 9, 0, 5, 10, 5, 5 },
+ /*M*/ { 5, 5, 0, 5, 10, 5 },
+ /*P*/ { 5, 10, 10, 0, 10, 10 },
+ /*D*/ { 4, 9, 9, 14, 0, 9 },
+};
+
+/* Bit pattern to latch (AZ_B column used in FAST_MODE only) */
+static const short AztecLatch[5][6] = {
+ /* U L M P D B */
+ /*U*/ { 0, 28, 29, (29 << 5) + 30, 30, 31 },
+ /*L*/ { (30 << 4) + 14, 0, 29, (29 << 5) + 30, 30, 31 },
+ /*M*/ { 29, 28, 0, 30, (29 << 5) + 30, 31 },
+ /*P*/ { 31, (31 << 5) + 28, (31 << 5) + 29, 0, (31 << 5) + 30, (31 << 5) + 31 },
+ /*D*/ { 14, (14 << 5) + 28, (14 << 5) + 29, (14 << 10) + (29 << 5) + 30, 0, (14 << 5) + 31 },
+};
+
+/* From Table 2 */
+static const char AztecChar[5][128] = {
+ { /* AZ_U */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*0-15*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*16-31*/
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*32-47*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*48-63*/
+ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, /*64-79*/
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, /*80-95*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*96-111*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /*112-127*/
+ }, { /* AZ_L */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*0-15*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*16-31*/
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*32-47*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*48-63*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*64-79*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*80-95*/
+ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, /*96-111*/
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0 /*112-127*/
+ }, { /* AZ_M */
+ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 0, /*0-15*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 17, 18, 19, /*16-31*/
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*32-47*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*48-63*/
+ 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*64-79*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 22, 23, /*80-95*/
+ 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*96-111*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 26, 27 /*112-127*/
+ }, { /* AZ_P with [abcd] mapped to doubles */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, /*0-15*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*16-31*/
+ 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, /*32-47*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 22, 23, 24, 25, 26, /*48-63*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*64-79*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 28, 0, 0, /*80-95*/
+ 0, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*96-111*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 30, 0, 0 /*112-127*/
+ }, { /* AZ_D */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*0-15*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*16-31*/
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 13, 0, /*32-47*/
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, /*48-63*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*64-79*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*80-95*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*96-111*/
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /*112-127*/
+ }
+};
+
+/* A map showing the available shift codes (B/S not shown) */
+static const signed char AztecShift[5][5] = {
+ /* U L M P D */
+ /*U*/ { -1, -1, -1, 0, -1 },
+ /*L*/ { 28, -1, -1, 0, -1 },
+ /*M*/ { -1, -1, -1, 0, -1 },
+ /*P*/ { -1, -1, -1, -1, -1 },
+ /*D*/ { 15, -1, -1, 0, -1 },
+};
+
/* Codewords per symbol */
static const short AztecSizes[32] = {
21, 48, 60, 88, 120, 156, 196, 240, 230, 272, 316, 364, 416, 470, 528, 588,
diff --git a/backend/dmatrix.c b/backend/dmatrix.c
index 99cecbbf..4af2a7bf 100644
--- a/backend/dmatrix.c
+++ b/backend/dmatrix.c
@@ -1,7 +1,7 @@
/* dmatrix.c Handles Data Matrix ECC 200 symbols */
/*
libzint - the open source barcode library
- Copyright (C) 2009-2025 Robin Stuart
+ Copyright (C) 2009-2026 Robin Stuart
developed from and including some functions from:
IEC16022 bar code generation
@@ -580,6 +580,8 @@ static int dm_edi_buffer_xfer(int process_buffer[8], int process_p, unsigned cha
return process_p;
}
+#define DM_DMRE_SQUARE_MASK 0x65 /* 101 */
+
/* Get index of symbol size in codewords array `dm_matrixbytes`, as specified or
else smallest containing `minimum` codewords */
static int dm_get_symbolsize(struct zint_symbol *symbol, const int minimum) {
@@ -593,10 +595,10 @@ static int dm_get_symbolsize(struct zint_symbol *symbol, const int minimum) {
}
for (i = minimum >= 62 ? 23 : 0; minimum > dm_matrixbytes[i]; i++);
- if ((symbol->option_3 & 0x7F) == DM_DMRE) {
+ if ((symbol->option_3 & DM_DMRE_SQUARE_MASK) == DM_DMRE) {
return i;
}
- if ((symbol->option_3 & 0x7F) == DM_SQUARE) {
+ if ((symbol->option_3 & DM_DMRE_SQUARE_MASK) == DM_SQUARE) {
/* Skip rectangular symbols in square only mode */
for (; dm_matrixH[i] != dm_matrixW[i]; i++);
return i;
@@ -992,6 +994,8 @@ static int dm_define_modes(struct zint_symbol *symbol, char modes[], const unsig
if (!edges) {
return 0;
}
+ assert((length + 1) * DM_NUM_MODES < USHRT_MAX); /* Guaranteed by input length limit */
+
dm_addEdges(symbol, source, length, last_seg, edges, 0, NULL, gs1);
DM_TRACE_Edges("DEBUG Initial situation\n", source, length, edges, 0);
diff --git a/backend/pdf417.c b/backend/pdf417.c
index f928fd60..7c1848a0 100644
--- a/backend/pdf417.c
+++ b/backend/pdf417.c
@@ -1,7 +1,7 @@
/* pdf417.c - Handles PDF417 stacked symbology */
/*
libzint - the open source barcode library
- Copyright (C) 2008-2025 Robin Stuart
+ Copyright (C) 2008-2026 Robin Stuart
Portions Copyright (C) 2004 Grandzebu
Bug Fixes thanks to KL Chin
@@ -932,6 +932,8 @@ static int pdf_define_modes(short liste[3][PDF_MAX_LEN], int *p_indexliste, cons
if (!edges) {
return 0;
}
+ assert((length + 1) * PDF_NUM_MODES < USHRT_MAX); /* Guaranteed by input length limit */
+
pdf_addEdges(source, length, lastmode, edges, 0, NULL);
PDF_TRACE_Edges("DEBUG Initial situation\n", source, length, edges, 0);
diff --git a/backend/tests/test_aztec.c b/backend/tests/test_aztec.c
index b27fafde..831d77bf 100644
--- a/backend/tests/test_aztec.c
+++ b/backend/tests/test_aztec.c
@@ -54,133 +54,134 @@ static void test_large(const testCtx *const p_ctx) {
};
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
static const struct item data[] = {
- /* 0*/ { BARCODE_AZTEC, -1, -1, 1, -1, -1, -1, { 0, 0, "" }, "1A", 10921, ZINT_ERROR_TOO_LONG, 0, 0, "Error 502: Input too long, requires too many codewords (maximum 1661)", 3, "Does not trigger USHRT_MAX check" },
- /* 1*/ { BARCODE_AZTEC, -1, -1, 1, -1, -1, -1, { 0, 0, "" }, "1A", 10922, ZINT_ERROR_TOO_LONG, 0, 0, "Error 502: Input too long, requires too many codewords (maximum 1661)", 3, "Triggers USHRT_MAX check" },
- /* 2*/ { BARCODE_AZTEC, FAST_MODE, -1, 1, -1, -1, -1, { 0, 0, "" }, "1A", 10922, ZINT_ERROR_TOO_LONG, 0, 0, "Error 502: Input too long, requires too many codewords (maximum 1661)", 3, "FAST_MODE has no such check (and doesn't need it)" },
- /* 3*/ { BARCODE_AZTEC, -1, -1, 1, -1, -1, -1, { 0, 0, "" }, "\377", 2051, 0, 151, 151, "", 3, "" },
- /* 4*/ { BARCODE_AZTEC, -1, -1, 1, -1, -1, -1, { 0, 0, "" }, "\377", 2052, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 1, requires 1495 codewords (maximum 1494)", 3, "" },
- /* 5*/ { BARCODE_AZTEC, -1, -1, 1, -1, -1, -1, { 0, 0, "" }, "\377", 2236, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 1, requires 1630 codewords (maximum 1494)", 3, "" },
- /* 6*/ { BARCODE_AZTEC, -1, -1, 1, -1, -1, -1, { 0, 0, "" }, "\377", 2237, ZINT_ERROR_TOO_LONG, 0, 0, "Error 707: Input too long for ECC level 1, requires too many codewords (maximum 1494)", 3, "" },
- /* 7*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "1", 3832, 0, 151, 151, "", 1, "" },
- /* 8*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "1", 3833, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 2, requires 1279 codewords (maximum 1278)", 1, "" },
- /* 9*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "A", 3067, 0, 151, 151, "", 1, "" },
- /* 10*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "A", 3068, ZINT_ERROR_TOO_LONG, 0, 0, "Error 707: Input too long for ECC level 2, requires too many codewords (maximum 1278)", 1, "" },
- /* 11*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "\240", 1914, 0, 151, 151, "", 3, "This is what Table 1 gives as Bytes capacity (no bit-stuffing)" },
- /* 12*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "\240", 1915, ZINT_ERROR_TOO_LONG, 151, 151, "Error 707: Input too long for ECC level 2, requires too many codewords (maximum 1278)", 3, "" },
- /* 13*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "\377", 1754, 0, 151, 151, "", 3, "This is Bytes capacity with max bit-stuffing" },
- /* 14*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "\377", 1755, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 2, requires 1279 codewords (maximum 1278)", 3, "" },
- /* 15*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "1", 3181, 0, 151, 151, "", 1, "" },
- /* 16*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "1", 3182, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 3, requires 1062 codewords (maximum 1061)", 1, "" },
- /* 17*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "A", 2402, 0, 147, 147, "", 1, "" },
- /* 18*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "A", 2549, ZINT_ERROR_TOO_LONG, 0, 0, "Error 707: Input too long for ECC level 3, requires too many codewords (maximum 1061)", 1, "" },
- /* 19*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "\377", 1456, 0, 151, 151, "", 3, "" },
- /* 20*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "\377", 1457, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 3, requires 1062 codewords (maximum 1061)", 3, "" },
- /* 21*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "1", 2485, 0, 151, 151, "", 1, "" },
- /* 22*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "1", 2486, ZINT_ERROR_TOO_LONG, 0, 0, "Error 707: Input too long for ECC level 4, requires too many codewords (maximum 829)", 1, "" },
- /* 23*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "A", 1989, 0, 151, 151, "", 1, "" },
- /* 24*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "A", 1990, ZINT_ERROR_TOO_LONG, 0, 0, "Error 707: Input too long for ECC level 4, requires too many codewords (maximum 829)", 1, "" },
- /* 25*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "\377", 1137, 0, 151, 151, "", 3, "" },
- /* 26*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "\377", 1138, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 4, requires 830 codewords (maximum 829)", 3, "" },
- /* 27*/ { BARCODE_AZTEC, -1, -1, -1, 1, -1, -1, { 0, 0, "" }, "\377", 7, 0, 15, 15, "", 3, "4 ECC codewords" },
- /* 28*/ { BARCODE_AZTEC, -1, -1, -1, 1, -1, -1, { 0, 0, "" }, "\377", 8, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 1, requires too many codewords (maximum 14)", 3, "" },
- /* 29*/ { BARCODE_AZTEC, -1, -1, -1, 1, -1, -1, { 0, 0, "" }, "\377", 2078, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 1, requires too many codewords (maximum 14)", 3, "" },
- /* 30*/ { BARCODE_AZTEC, -1, -1, -1, 2, -1, -1, { 0, 0, "" }, "\377", 21, ZINT_WARN_NONCOMPLIANT, 19, 19, "Warning 708: Number of ECC codewords 4 less than 5% + 3 of data codewords 36", 3, "4 ECC codewords" },
- /* 31*/ { BARCODE_AZTEC, -1, -1, -1, 2, -1, -1, { 0, 0, "" }, "\377", 22, ZINT_WARN_NONCOMPLIANT, 19, 19, "Warning 706: Number of ECC codewords 3 at minimum", 3, "3 ECC codewords" },
- /* 32*/ { BARCODE_AZTEC, -1, -1, -1, 2, -1, -1, { 0, 0, "" }, "\377", 23, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 2, requires too many codewords (maximum 37)", 3, "" },
- /* 33*/ { BARCODE_AZTEC, -1, -1, -1, 2, -1, -1, { 0, 0, "" }, "\377", 1866, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 2, requires too many codewords (maximum 37)", 3, "" },
- /* 34*/ { BARCODE_AZTEC, -1, -1, -1, 3, -1, -1, { 0, 0, "" }, "\377", 39, ZINT_WARN_NONCOMPLIANT, 23, 23, "Warning 706: Number of ECC codewords 3 at minimum", 3, "3 ECC codewords" },
- /* 35*/ { BARCODE_AZTEC, -1, -1, -1, 3, -1, -1, { 0, 0, "" }, "\377", 40, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 3, requires too many codewords (maximum 48)", 3, "" },
- /* 36*/ { BARCODE_AZTEC, -1, -1, -1, 4, -1, -1, { 0, 0, "" }, "\377", 51, 0, 27, 27, "", 3, "15 ECC codewords (Version 4 (compact) spare 12 ECC blocks bonus)" },
- /* 37*/ { BARCODE_AZTEC, -1, -1, -1, 4, -1, -1, { 0, 0, "" }, "\377", 52, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 4, requires too many codewords (maximum 61)", 3, "" },
- /* 38*/ { BARCODE_AZTEC, -1, -1, -1, 5, -1, -1, { 0, 0, "" }, "\377", 10, ZINT_WARN_NONCOMPLIANT, 19, 19, "Warning 706: Number of ECC codewords 3 at minimum", 3, "3 ECC codewords" },
- /* 39*/ { BARCODE_AZTEC, -1, -1, -1, 5, -1, -1, { 0, 0, "" }, "\377", 11, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 5, requires too many codewords (maximum 18)", 3, "" },
- /* 40*/ { BARCODE_AZTEC, -1, -1, -1, 6, -1, -1, { 0, 0, "" }, "\377", 27, ZINT_WARN_NONCOMPLIANT, 23, 23, "Warning 706: Number of ECC codewords 3 at minimum", 3, "3 ECC codewords" },
- /* 41*/ { BARCODE_AZTEC, -1, -1, -1, 6, -1, -1, { 0, 0, "" }, "\377", 28, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 6, requires too many codewords (maximum 45)", 3, "" },
- /* 42*/ { BARCODE_AZTEC, -1, -1, -1, 7, -1, -1, { 0, 0, "" }, "\377", 47, ZINT_WARN_NONCOMPLIANT, 27, 27, "Warning 706: Number of ECC codewords 3 at minimum", 3, "3 ECC codewords" },
- /* 43*/ { BARCODE_AZTEC, -1, -1, -1, 7, -1, -1, { 0, 0, "" }, "\377", 48, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 7, requires too many codewords (maximum 57)", 3, "" },
- /* 44*/ { BARCODE_AZTEC, -1, -1, -1, 8, -1, -1, { 0, 0, "" }, "\377", 71, ZINT_WARN_NONCOMPLIANT, 31, 31, "Warning 708: Number of ECC codewords 4 less than 5% + 3 of data codewords 84", 3, "4 ECC codewords" },
- /* 45*/ { BARCODE_AZTEC, -1, -1, -1, 8, -1, -1, { 0, 0, "" }, "\377", 72, ZINT_WARN_NONCOMPLIANT, 31, 31, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 46*/ { BARCODE_AZTEC, -1, -1, -1, 8, -1, -1, { 0, 0, "" }, "\377", 73, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 8, requires too many codewords (maximum 85)", 3, "" },
- /* 47*/ { BARCODE_AZTEC, -1, -1, -1, 9, -1, -1, { 0, 0, "" }, "\377", 98, ZINT_WARN_NONCOMPLIANT, 37, 37, "Warning 708: Number of ECC codewords 5 less than 5% + 3 of data codewords 115", 3, "5 ECC codewords" },
- /* 48*/ { BARCODE_AZTEC, -1, -1, -1, 9, -1, -1, { 0, 0, "" }, "\377", 100, ZINT_WARN_NONCOMPLIANT, 37, 37, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 49*/ { BARCODE_AZTEC, -1, -1, -1, 9, -1, -1, { 0, 0, "" }, "\377", 101, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 9, requires too many codewords (maximum 117)", 3, "" },
- /* 50*/ { BARCODE_AZTEC, -1, -1, -1, 10, -1, -1, { 0, 0, "" }, "\377", 128, ZINT_WARN_NONCOMPLIANT, 41, 41, "Warning 708: Number of ECC codewords 7 less than 5% + 3 of data codewords 149", 3, "7 ECC codewords" },
- /* 51*/ { BARCODE_AZTEC, -1, -1, -1, 10, -1, -1, { 0, 0, "" }, "\377", 129, ZINT_WARN_NONCOMPLIANT, 41, 41, "Warning 708: Number of ECC codewords 6 less than 5% + 3 of data codewords 150", 3, "" },
- /* 52*/ { BARCODE_AZTEC, -1, -1, -1, 10, -1, -1, { 0, 0, "" }, "\377", 131, ZINT_WARN_NONCOMPLIANT, 41, 41, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 53*/ { BARCODE_AZTEC, -1, -1, -1, 10, -1, -1, { 0, 0, "" }, "\377", 132, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 10, requires too many codewords (maximum 153)", 3, "" },
- /* 54*/ { BARCODE_AZTEC, -1, -1, -1, 11, -1, -1, { 0, 0, "" }, "\377", 166, ZINT_WARN_NONCOMPLIANT, 45, 45, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 55*/ { BARCODE_AZTEC, -1, -1, -1, 11, -1, -1, { 0, 0, "" }, "\377", 167, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 11, requires too many codewords (maximum 193)", 3, "" },
- /* 56*/ { BARCODE_AZTEC, -1, -1, -1, 12, -1, -1, { 0, 0, "" }, "\377", 205, ZINT_WARN_NONCOMPLIANT, 49, 49, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 57*/ { BARCODE_AZTEC, -1, -1, -1, 12, -1, -1, { 0, 0, "" }, "\377", 206, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 12, requires too many codewords (maximum 237)", 3, "" },
- /* 58*/ { BARCODE_AZTEC, -1, -1, -1, 13, -1, -1, { 0, 0, "" }, "\377", 253, ZINT_WARN_NONCOMPLIANT, 53, 53, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 59*/ { BARCODE_AZTEC, -1, -1, -1, 13, -1, -1, { 0, 0, "" }, "\377", 254, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 13, requires too many codewords (maximum 227)", 3, "" },
- /* 60*/ { BARCODE_AZTEC, -1, -1, -1, 14, -1, -1, { 0, 0, "" }, "\377", 300, ZINT_WARN_NONCOMPLIANT, 57, 57, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 61*/ { BARCODE_AZTEC, -1, -1, -1, 14, -1, -1, { 0, 0, "" }, "\377", 301, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 14, requires too many codewords (maximum 269)", 3, "" },
- /* 62*/ { BARCODE_AZTEC, -1, -1, -1, 15, -1, -1, { 0, 0, "" }, "\377", 349, ZINT_WARN_NONCOMPLIANT, 61, 61, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 63*/ { BARCODE_AZTEC, -1, -1, -1, 15, -1, -1, { 0, 0, "" }, "\377", 350, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 15, requires too many codewords (maximum 313)", 3, "" },
- /* 64*/ { BARCODE_AZTEC, -1, -1, -1, 16, -1, -1, { 0, 0, "" }, "\377", 403, ZINT_WARN_NONCOMPLIANT, 67, 67, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 65*/ { BARCODE_AZTEC, -1, -1, -1, 16, -1, -1, { 0, 0, "" }, "\377", 404, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 16, requires too many codewords (maximum 361)", 3, "" },
- /* 66*/ { BARCODE_AZTEC, -1, -1, -1, 17, -1, -1, { 0, 0, "" }, "\377", 462, ZINT_WARN_NONCOMPLIANT, 71, 71, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 67*/ { BARCODE_AZTEC, -1, -1, -1, 17, -1, -1, { 0, 0, "" }, "\377", 463, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 17, requires too many codewords (maximum 413)", 3, "" },
- /* 68*/ { BARCODE_AZTEC, -1, -1, -1, 18, -1, -1, { 0, 0, "" }, "\377", 501, ZINT_WARN_NONCOMPLIANT, 75, 75, "Warning 708: Number of ECC codewords 22 less than 5% + 3 of data codewords 448", 3, "22 ECC codewords (448 data codewords)" },
- /* 69*/ { BARCODE_AZTEC, -1, -1, -1, 18, -1, -1, { 0, 0, "" }, "\377", 502, ZINT_WARN_NONCOMPLIANT, 75, 75, "Warning 708: Number of ECC codewords 21 less than 5% + 3 of data codewords 449", 3, "" },
- /* 70*/ { BARCODE_AZTEC, -1, -1, -1, 18, -1, -1, { 0, 0, "" }, "\377", 523, ZINT_WARN_NONCOMPLIANT, 75, 75, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 71*/ { BARCODE_AZTEC, -1, -1, -1, 18, -1, -1, { 0, 0, "" }, "\377", 524, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 18, requires too many codewords (maximum 467)", 3, "" },
- /* 72*/ { BARCODE_AZTEC, -1, -1, -1, 19, -1, -1, { 0, 0, "" }, "\377", 588, ZINT_WARN_NONCOMPLIANT, 79, 79, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 73*/ { BARCODE_AZTEC, -1, -1, -1, 19, -1, -1, { 0, 0, "" }, "\377", 589, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 19, requires too many codewords (maximum 525)", 3, "" },
- /* 74*/ { BARCODE_AZTEC, -1, -1, -1, 20, -1, -1, { 0, 0, "" }, "\377", 655, ZINT_WARN_NONCOMPLIANT, 83, 83, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 75*/ { BARCODE_AZTEC, -1, -1, -1, 20, -1, -1, { 0, 0, "" }, "\377", 656, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 20, requires too many codewords (maximum 585)", 3, "" },
- /* 76*/ { BARCODE_AZTEC, -1, -1, -1, 21, -1, -1, { 0, 0, "" }, "\377", 727, ZINT_WARN_NONCOMPLIANT, 87, 87, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 77*/ { BARCODE_AZTEC, -1, -1, -1, 21, -1, -1, { 0, 0, "" }, "\377", 728, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 21, requires too many codewords (maximum 649)", 3, "" },
- /* 78*/ { BARCODE_AZTEC, -1, -1, -1, 22, -1, -1, { 0, 0, "" }, "\377", 804, ZINT_WARN_NONCOMPLIANT, 91, 91, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 79*/ { BARCODE_AZTEC, -1, -1, -1, 22, -1, -1, { 0, 0, "" }, "\377", 805, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 22, requires too many codewords (maximum 717)", 3, "" },
- /* 80*/ { BARCODE_AZTEC, -1, -1, -1, 23, -1, -1, { 0, 0, "" }, "\377", 883, ZINT_WARN_NONCOMPLIANT, 95, 95, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 81*/ { BARCODE_AZTEC, -1, -1, -1, 23, -1, -1, { 0, 0, "" }, "\377", 884, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 23, requires too many codewords (maximum 787)", 3, "" },
- /* 82*/ { BARCODE_AZTEC, -1, -1, -1, 24, -1, -1, { 0, 0, "" }, "\377", 966, ZINT_WARN_NONCOMPLIANT, 101, 101, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 83*/ { BARCODE_AZTEC, -1, -1, -1, 24, -1, -1, { 0, 0, "" }, "\377", 967, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 24, requires too many codewords (maximum 861)", 3, "" },
- /* 84*/ { BARCODE_AZTEC, -1, -1, -1, 25, -1, -1, { 0, 0, "" }, "\377", 1051, ZINT_WARN_NONCOMPLIANT, 105, 105, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 85*/ { BARCODE_AZTEC, -1, -1, -1, 25, -1, -1, { 0, 0, "" }, "\377", 1052, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 25, requires too many codewords (maximum 937)", 3, "" },
- /* 86*/ { BARCODE_AZTEC, -1, -1, -1, 26, -1, -1, { 0, 0, "" }, "\377", 1091, ZINT_WARN_NONCOMPLIANT, 109, 109, "Warning 708: Number of ECC codewords 48 less than 5% + 3 of data codewords 972", 3, "" },
- /* 87*/ { BARCODE_AZTEC, -1, -1, -1, 26, -1, -1, { 0, 0, "" }, "\377", 1092, ZINT_WARN_NONCOMPLIANT, 109, 109, "Warning 708: Number of ECC codewords 47 less than 5% + 3 of data codewords 973", 3, "" },
- /* 88*/ { BARCODE_AZTEC, -1, -1, -1, 26, -1, -1, { 0, 0, "" }, "\377", 1141, ZINT_WARN_NONCOMPLIANT, 109, 109, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 89*/ { BARCODE_AZTEC, -1, -1, -1, 26, -1, -1, { 0, 0, "" }, "\377", 1142, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 26, requires too many codewords (maximum 1017)", 3, "" },
- /* 90*/ { BARCODE_AZTEC, -1, -1, -1, 27, -1, -1, { 0, 0, "" }, "\377", 1258, ZINT_WARN_NONCOMPLIANT, 113, 113, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 91*/ { BARCODE_AZTEC, -1, -1, -1, 27, -1, -1, { 0, 0, "" }, "\377", 1259, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 27, requires too many codewords (maximum 917)", 3, "" },
- /* 92*/ { BARCODE_AZTEC, -1, -1, -1, 28, -1, -1, { 0, 0, "" }, "\377", 1357, ZINT_WARN_NONCOMPLIANT, 117, 117, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 93*/ { BARCODE_AZTEC, -1, -1, -1, 28, -1, -1, { 0, 0, "" }, "\377", 1358, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 28, requires too many codewords (maximum 989)", 3, "" },
- /* 94*/ { BARCODE_AZTEC, -1, -1, -1, 29, -1, -1, { 0, 0, "" }, "\377", 1459, ZINT_WARN_NONCOMPLIANT, 121, 121, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 95*/ { BARCODE_AZTEC, -1, -1, -1, 29, -1, -1, { 0, 0, "" }, "\377", 1460, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 29, requires too many codewords (maximum 1063)", 3, "" },
- /* 96*/ { BARCODE_AZTEC, -1, -1, -1, 30, -1, -1, { 0, 0, "" }, "\377", 1566, ZINT_WARN_NONCOMPLIANT, 125, 125, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 97*/ { BARCODE_AZTEC, -1, -1, -1, 30, -1, -1, { 0, 0, "" }, "\377", 1567, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 30, requires too many codewords (maximum 1141)", 3, "" },
- /* 98*/ { BARCODE_AZTEC, -1, -1, -1, 31, -1, -1, { 0, 0, "" }, "\377", 1676, ZINT_WARN_NONCOMPLIANT, 131, 131, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /* 99*/ { BARCODE_AZTEC, -1, -1, -1, 31, -1, -1, { 0, 0, "" }, "\377", 1677, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 31, requires too many codewords (maximum 1221)", 3, "" },
- /*100*/ { BARCODE_AZTEC, -1, -1, -1, 32, -1, -1, { 0, 0, "" }, "\377", 1789, ZINT_WARN_NONCOMPLIANT, 135, 135, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /*101*/ { BARCODE_AZTEC, -1, -1, -1, 32, -1, -1, { 0, 0, "" }, "\377", 1790, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 32, requires too many codewords (maximum 1303)", 3, "" },
- /*102*/ { BARCODE_AZTEC, -1, -1, -1, 33, -1, -1, { 0, 0, "" }, "\377", 1907, ZINT_WARN_NONCOMPLIANT, 139, 139, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /*103*/ { BARCODE_AZTEC, -1, -1, -1, 33, -1, -1, { 0, 0, "" }, "\377", 1908, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 33, requires too many codewords (maximum 1389)", 3, "" },
- /*104*/ { BARCODE_AZTEC, -1, -1, -1, 34, -1, -1, { 0, 0, "" }, "1", 4429, ZINT_WARN_NONCOMPLIANT, 143, 143, "Warning 706: Number of ECC codewords 3 at minimum", 1, "" },
- /*105*/ { BARCODE_AZTEC, -1, -1, -1, 34, -1, -1, { 0, 0, "" }, "1", 4430, ZINT_ERROR_TOO_LONG, 0, 0, "Error 505: Input too long for Version 34, requires 1478 codewords (maximum 1477)", 1, "" },
- /*106*/ { BARCODE_AZTEC, -1, -1, -1, 34, -1, -1, { 0, 0, "" }, "\377", 2028, ZINT_WARN_NONCOMPLIANT, 143, 143, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /*107*/ { BARCODE_AZTEC, -1, -1, -1, 34, -1, -1, { 0, 0, "" }, "\377", 2029, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 34, requires too many codewords (maximum 1477)", 3, "" },
- /*108*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "1", 4699, ZINT_WARN_NONCOMPLIANT, 147, 147, "Warning 706: Number of ECC codewords 3 at minimum", 1, "" },
- /*109*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "1", 4700, ZINT_ERROR_TOO_LONG, 0, 0, "Error 505: Input too long for Version 35, requires 1568 codewords (maximum 1567)", 1, "" },
- /*110*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "A", 3590, ZINT_WARN_NONCOMPLIANT, 147, 147, "Warning 708: Number of ECC codewords 74 less than 5% + 3 of data codewords 1496", 1, "74 ECC codewords (1496 data codewords)" },
- /*111*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "A", 3591, ZINT_WARN_NONCOMPLIANT, 147, 147, "Warning 708: Number of ECC codewords 73 less than 5% + 3 of data codewords 1497", 1, "" },
- /*112*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "A", 3760, ZINT_WARN_NONCOMPLIANT, 147, 147, "Warning 706: Number of ECC codewords 3 at minimum", 1, "" },
- /*113*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "A", 3761, ZINT_ERROR_TOO_LONG, 0, 0, "Error 505: Input too long for Version 35, requires 1568 codewords (maximum 1567)", 1, "" },
- /*114*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "\377", 2149, ZINT_WARN_NONCOMPLIANT, 147, 147, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /*115*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "\377", 2150, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 35, requires too many codewords (maximum 1567)", 3, "" },
- /*116*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "1", 4753, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 708: Number of ECC codewords 79 less than 5% + 3 of data codewords 1585", 1, "79 ECC codewords (1585 data codewords)" },
- /*117*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "1", 4981, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 1, "" },
- /*118*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "1", 4982, ZINT_ERROR_TOO_LONG, 0, 0, "Error 502: Input too long, requires too many codewords (maximum 1661)", 1, "" },
- /*119*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "\377", 2279, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /*120*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "\377", 2280, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 36, requires too many codewords (maximum 1661)", 3, "" },
- /*121*/ { BARCODE_AZTEC, -1, 899, -1, 36, -1, -1, { 0, 0, "" }, "\377", 2276, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /*122*/ { BARCODE_AZTEC, -1, 899, -1, 36, -1, -1, { 0, 0, "" }, "\377", 2277, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 36, requires too many codewords (maximum 1661)", 3, "" },
- /*123*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 2, 3, "" }, "\377", 2276, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /*124*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 2, 3, "" }, "\377", 2277, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 36, requires too many codewords (maximum 1661)", 3, "" },
- /*125*/ { BARCODE_AZTEC, -1, 899, -1, 36, -1, -1, { 2, 3, "" }, "\377", 2273, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
- /*126*/ { BARCODE_AZTEC, -1, 899, -1, 36, -1, -1, { 2, 3, "" }, "\377", 2274, ZINT_ERROR_TOO_LONG, 0, 0, "Error 505: Input too long for Version 36, requires 1662 codewords (maximum 1661)", 3, "" },
+ /* 0*/ { BARCODE_AZTEC, -1, -1, 1, -1, -1, -1, { 0, 0, "" }, "\377", 2051, 0, 151, 151, "", 3, "" },
+ /* 1*/ { BARCODE_AZTEC, -1, -1, 1, -1, -1, -1, { 0, 0, "" }, "\377", 2052, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 1, requires 1495 codewords (maximum 1494)", 3, "" },
+ /* 2*/ { BARCODE_AZTEC, -1, -1, 1, -1, -1, -1, { 0, 0, "" }, "\377", 2236, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 1, requires 1630 codewords (maximum 1494)", 3, "" },
+ /* 3*/ { BARCODE_AZTEC, -1, -1, 1, -1, -1, -1, { 0, 0, "" }, "\377", 2237, ZINT_ERROR_TOO_LONG, 0, 0, "Error 707: Input too long for ECC level 1, requires too many codewords (maximum 1494)", 3, "" },
+ /* 4*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "1", 3832, 0, 151, 151, "", 1, "" },
+ /* 5*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "1", 3833, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 2, requires 1279 codewords (maximum 1278)", 1, "" },
+ /* 6*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "A", 3067, 0, 151, 151, "", 1, "" },
+ /* 7*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "A", 3068, ZINT_ERROR_TOO_LONG, 0, 0, "Error 707: Input too long for ECC level 2, requires too many codewords (maximum 1278)", 1, "" },
+ /* 8*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "\240", 1914, 0, 151, 151, "", 3, "This is what Table 1 gives as Bytes capacity (no bit-stuffing)" },
+ /* 9*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "\240", 1915, ZINT_ERROR_TOO_LONG, 151, 151, "Error 707: Input too long for ECC level 2, requires too many codewords (maximum 1278)", 3, "" },
+ /* 10*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "\377", 1754, 0, 151, 151, "", 3, "This is Bytes capacity with max bit-stuffing" },
+ /* 11*/ { BARCODE_AZTEC, -1, -1, 2, -1, -1, -1, { 0, 0, "" }, "\377", 1755, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 2, requires 1279 codewords (maximum 1278)", 3, "" },
+ /* 12*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "1", 3181, 0, 151, 151, "", 1, "" },
+ /* 13*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "1", 3182, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 3, requires 1062 codewords (maximum 1061)", 1, "" },
+ /* 14*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "A", 2402, 0, 147, 147, "", 1, "" },
+ /* 15*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "A", 2549, ZINT_ERROR_TOO_LONG, 0, 0, "Error 707: Input too long for ECC level 3, requires too many codewords (maximum 1061)", 1, "" },
+ /* 16*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "\377", 1456, 0, 151, 151, "", 3, "" },
+ /* 17*/ { BARCODE_AZTEC, -1, -1, 3, -1, -1, -1, { 0, 0, "" }, "\377", 1457, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 3, requires 1062 codewords (maximum 1061)", 3, "" },
+ /* 18*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "1", 2485, 0, 151, 151, "", 1, "" },
+ /* 19*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "1", 2486, ZINT_ERROR_TOO_LONG, 0, 0, "Error 707: Input too long for ECC level 4, requires too many codewords (maximum 829)", 1, "" },
+ /* 20*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "A", 1989, 0, 151, 151, "", 1, "" },
+ /* 21*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "A", 1990, ZINT_ERROR_TOO_LONG, 0, 0, "Error 707: Input too long for ECC level 4, requires too many codewords (maximum 829)", 1, "" },
+ /* 22*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "\377", 1137, 0, 151, 151, "", 3, "" },
+ /* 23*/ { BARCODE_AZTEC, -1, -1, 4, -1, -1, -1, { 0, 0, "" }, "\377", 1138, ZINT_ERROR_TOO_LONG, 0, 0, "Error 504: Input too long for ECC level 4, requires 830 codewords (maximum 829)", 3, "" },
+ /* 24*/ { BARCODE_AZTEC, -1, -1, -1, 1, -1, -1, { 0, 0, "" }, "\377", 7, 0, 15, 15, "", 3, "4 ECC codewords" },
+ /* 25*/ { BARCODE_AZTEC, -1, -1, -1, 1, -1, -1, { 0, 0, "" }, "\377", 8, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 1, requires too many codewords (maximum 14)", 3, "" },
+ /* 26*/ { BARCODE_AZTEC, -1, -1, -1, 1, -1, -1, { 0, 0, "" }, "\377", 2078, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 1, requires too many codewords (maximum 14)", 3, "" },
+ /* 27*/ { BARCODE_AZTEC, -1, -1, -1, 2, -1, -1, { 0, 0, "" }, "\377", 21, ZINT_WARN_NONCOMPLIANT, 19, 19, "Warning 708: Number of ECC codewords 4 less than 5% + 3 of data codewords 36", 3, "4 ECC codewords" },
+ /* 28*/ { BARCODE_AZTEC, -1, -1, -1, 2, -1, -1, { 0, 0, "" }, "\377", 22, ZINT_WARN_NONCOMPLIANT, 19, 19, "Warning 706: Number of ECC codewords 3 at minimum", 3, "3 ECC codewords" },
+ /* 29*/ { BARCODE_AZTEC, -1, -1, -1, 2, -1, -1, { 0, 0, "" }, "\377", 23, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 2, requires too many codewords (maximum 37)", 3, "" },
+ /* 30*/ { BARCODE_AZTEC, -1, -1, -1, 2, -1, -1, { 0, 0, "" }, "\377", 1866, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 2, requires too many codewords (maximum 37)", 3, "" },
+ /* 31*/ { BARCODE_AZTEC, -1, -1, -1, 3, -1, -1, { 0, 0, "" }, "\377", 39, ZINT_WARN_NONCOMPLIANT, 23, 23, "Warning 706: Number of ECC codewords 3 at minimum", 3, "3 ECC codewords" },
+ /* 32*/ { BARCODE_AZTEC, -1, -1, -1, 3, -1, -1, { 0, 0, "" }, "\377", 40, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 3, requires too many codewords (maximum 48)", 3, "" },
+ /* 33*/ { BARCODE_AZTEC, -1, -1, -1, 4, -1, -1, { 0, 0, "" }, "\377", 51, 0, 27, 27, "", 3, "15 ECC codewords (Version 4 (compact) spare 12 ECC blocks bonus)" },
+ /* 34*/ { BARCODE_AZTEC, -1, -1, -1, 4, -1, -1, { 0, 0, "" }, "\377", 52, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 4, requires too many codewords (maximum 61)", 3, "" },
+ /* 35*/ { BARCODE_AZTEC, -1, -1, -1, 5, -1, -1, { 0, 0, "" }, "\377", 10, ZINT_WARN_NONCOMPLIANT, 19, 19, "Warning 706: Number of ECC codewords 3 at minimum", 3, "3 ECC codewords" },
+ /* 36*/ { BARCODE_AZTEC, -1, -1, -1, 5, -1, -1, { 0, 0, "" }, "\377", 11, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 5, requires too many codewords (maximum 18)", 3, "" },
+ /* 37*/ { BARCODE_AZTEC, -1, -1, -1, 6, -1, -1, { 0, 0, "" }, "\377", 27, ZINT_WARN_NONCOMPLIANT, 23, 23, "Warning 706: Number of ECC codewords 3 at minimum", 3, "3 ECC codewords" },
+ /* 38*/ { BARCODE_AZTEC, -1, -1, -1, 6, -1, -1, { 0, 0, "" }, "\377", 28, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 6, requires too many codewords (maximum 45)", 3, "" },
+ /* 39*/ { BARCODE_AZTEC, -1, -1, -1, 7, -1, -1, { 0, 0, "" }, "\377", 47, ZINT_WARN_NONCOMPLIANT, 27, 27, "Warning 706: Number of ECC codewords 3 at minimum", 3, "3 ECC codewords" },
+ /* 40*/ { BARCODE_AZTEC, -1, -1, -1, 7, -1, -1, { 0, 0, "" }, "\377", 48, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 7, requires too many codewords (maximum 57)", 3, "" },
+ /* 41*/ { BARCODE_AZTEC, -1, -1, -1, 8, -1, -1, { 0, 0, "" }, "\377", 71, ZINT_WARN_NONCOMPLIANT, 31, 31, "Warning 708: Number of ECC codewords 4 less than 5% + 3 of data codewords 84", 3, "4 ECC codewords" },
+ /* 42*/ { BARCODE_AZTEC, -1, -1, -1, 8, -1, -1, { 0, 0, "" }, "\377", 72, ZINT_WARN_NONCOMPLIANT, 31, 31, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 43*/ { BARCODE_AZTEC, -1, -1, -1, 8, -1, -1, { 0, 0, "" }, "\377", 73, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 8, requires too many codewords (maximum 85)", 3, "" },
+ /* 44*/ { BARCODE_AZTEC, -1, -1, -1, 9, -1, -1, { 0, 0, "" }, "\377", 98, ZINT_WARN_NONCOMPLIANT, 37, 37, "Warning 708: Number of ECC codewords 5 less than 5% + 3 of data codewords 115", 3, "5 ECC codewords" },
+ /* 45*/ { BARCODE_AZTEC, -1, -1, -1, 9, -1, -1, { 0, 0, "" }, "\377", 100, ZINT_WARN_NONCOMPLIANT, 37, 37, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 46*/ { BARCODE_AZTEC, -1, -1, -1, 9, -1, -1, { 0, 0, "" }, "\377", 101, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 9, requires too many codewords (maximum 117)", 3, "" },
+ /* 47*/ { BARCODE_AZTEC, -1, -1, -1, 10, -1, -1, { 0, 0, "" }, "\377", 128, ZINT_WARN_NONCOMPLIANT, 41, 41, "Warning 708: Number of ECC codewords 7 less than 5% + 3 of data codewords 149", 3, "7 ECC codewords" },
+ /* 48*/ { BARCODE_AZTEC, -1, -1, -1, 10, -1, -1, { 0, 0, "" }, "\377", 129, ZINT_WARN_NONCOMPLIANT, 41, 41, "Warning 708: Number of ECC codewords 6 less than 5% + 3 of data codewords 150", 3, "" },
+ /* 49*/ { BARCODE_AZTEC, -1, -1, -1, 10, -1, -1, { 0, 0, "" }, "\377", 131, ZINT_WARN_NONCOMPLIANT, 41, 41, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 50*/ { BARCODE_AZTEC, -1, -1, -1, 10, -1, -1, { 0, 0, "" }, "\377", 132, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 10, requires too many codewords (maximum 153)", 3, "" },
+ /* 51*/ { BARCODE_AZTEC, -1, -1, -1, 11, -1, -1, { 0, 0, "" }, "\377", 166, ZINT_WARN_NONCOMPLIANT, 45, 45, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 52*/ { BARCODE_AZTEC, -1, -1, -1, 11, -1, -1, { 0, 0, "" }, "\377", 167, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 11, requires too many codewords (maximum 193)", 3, "" },
+ /* 53*/ { BARCODE_AZTEC, -1, -1, -1, 12, -1, -1, { 0, 0, "" }, "\377", 205, ZINT_WARN_NONCOMPLIANT, 49, 49, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 54*/ { BARCODE_AZTEC, -1, -1, -1, 12, -1, -1, { 0, 0, "" }, "\377", 206, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 12, requires too many codewords (maximum 237)", 3, "" },
+ /* 55*/ { BARCODE_AZTEC, -1, -1, -1, 13, -1, -1, { 0, 0, "" }, "\377", 253, ZINT_WARN_NONCOMPLIANT, 53, 53, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 56*/ { BARCODE_AZTEC, -1, -1, -1, 13, -1, -1, { 0, 0, "" }, "\377", 254, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 13, requires too many codewords (maximum 227)", 3, "" },
+ /* 57*/ { BARCODE_AZTEC, -1, -1, -1, 14, -1, -1, { 0, 0, "" }, "\377", 300, ZINT_WARN_NONCOMPLIANT, 57, 57, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 58*/ { BARCODE_AZTEC, -1, -1, -1, 14, -1, -1, { 0, 0, "" }, "\377", 301, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 14, requires too many codewords (maximum 269)", 3, "" },
+ /* 59*/ { BARCODE_AZTEC, -1, -1, -1, 15, -1, -1, { 0, 0, "" }, "\377", 349, ZINT_WARN_NONCOMPLIANT, 61, 61, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 60*/ { BARCODE_AZTEC, -1, -1, -1, 15, -1, -1, { 0, 0, "" }, "\377", 350, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 15, requires too many codewords (maximum 313)", 3, "" },
+ /* 61*/ { BARCODE_AZTEC, -1, -1, -1, 16, -1, -1, { 0, 0, "" }, "\377", 403, ZINT_WARN_NONCOMPLIANT, 67, 67, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 62*/ { BARCODE_AZTEC, -1, -1, -1, 16, -1, -1, { 0, 0, "" }, "\377", 404, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 16, requires too many codewords (maximum 361)", 3, "" },
+ /* 63*/ { BARCODE_AZTEC, -1, -1, -1, 17, -1, -1, { 0, 0, "" }, "\377", 462, ZINT_WARN_NONCOMPLIANT, 71, 71, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 64*/ { BARCODE_AZTEC, -1, -1, -1, 17, -1, -1, { 0, 0, "" }, "\377", 463, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 17, requires too many codewords (maximum 413)", 3, "" },
+ /* 65*/ { BARCODE_AZTEC, -1, -1, -1, 18, -1, -1, { 0, 0, "" }, "\377", 501, ZINT_WARN_NONCOMPLIANT, 75, 75, "Warning 708: Number of ECC codewords 22 less than 5% + 3 of data codewords 448", 3, "22 ECC codewords (448 data codewords)" },
+ /* 66*/ { BARCODE_AZTEC, -1, -1, -1, 18, -1, -1, { 0, 0, "" }, "\377", 502, ZINT_WARN_NONCOMPLIANT, 75, 75, "Warning 708: Number of ECC codewords 21 less than 5% + 3 of data codewords 449", 3, "" },
+ /* 67*/ { BARCODE_AZTEC, -1, -1, -1, 18, -1, -1, { 0, 0, "" }, "\377", 523, ZINT_WARN_NONCOMPLIANT, 75, 75, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 68*/ { BARCODE_AZTEC, -1, -1, -1, 18, -1, -1, { 0, 0, "" }, "\377", 524, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 18, requires too many codewords (maximum 467)", 3, "" },
+ /* 69*/ { BARCODE_AZTEC, -1, -1, -1, 19, -1, -1, { 0, 0, "" }, "\377", 588, ZINT_WARN_NONCOMPLIANT, 79, 79, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 70*/ { BARCODE_AZTEC, -1, -1, -1, 19, -1, -1, { 0, 0, "" }, "\377", 589, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 19, requires too many codewords (maximum 525)", 3, "" },
+ /* 71*/ { BARCODE_AZTEC, -1, -1, -1, 20, -1, -1, { 0, 0, "" }, "\377", 655, ZINT_WARN_NONCOMPLIANT, 83, 83, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 72*/ { BARCODE_AZTEC, -1, -1, -1, 20, -1, -1, { 0, 0, "" }, "\377", 656, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 20, requires too many codewords (maximum 585)", 3, "" },
+ /* 73*/ { BARCODE_AZTEC, -1, -1, -1, 21, -1, -1, { 0, 0, "" }, "\377", 727, ZINT_WARN_NONCOMPLIANT, 87, 87, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 74*/ { BARCODE_AZTEC, -1, -1, -1, 21, -1, -1, { 0, 0, "" }, "\377", 728, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 21, requires too many codewords (maximum 649)", 3, "" },
+ /* 75*/ { BARCODE_AZTEC, -1, -1, -1, 22, -1, -1, { 0, 0, "" }, "\377", 804, ZINT_WARN_NONCOMPLIANT, 91, 91, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 76*/ { BARCODE_AZTEC, -1, -1, -1, 22, -1, -1, { 0, 0, "" }, "\377", 805, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 22, requires too many codewords (maximum 717)", 3, "" },
+ /* 77*/ { BARCODE_AZTEC, -1, -1, -1, 23, -1, -1, { 0, 0, "" }, "\377", 883, ZINT_WARN_NONCOMPLIANT, 95, 95, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 78*/ { BARCODE_AZTEC, -1, -1, -1, 23, -1, -1, { 0, 0, "" }, "\377", 884, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 23, requires too many codewords (maximum 787)", 3, "" },
+ /* 79*/ { BARCODE_AZTEC, -1, -1, -1, 24, -1, -1, { 0, 0, "" }, "\377", 966, ZINT_WARN_NONCOMPLIANT, 101, 101, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 80*/ { BARCODE_AZTEC, -1, -1, -1, 24, -1, -1, { 0, 0, "" }, "\377", 967, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 24, requires too many codewords (maximum 861)", 3, "" },
+ /* 81*/ { BARCODE_AZTEC, -1, -1, -1, 25, -1, -1, { 0, 0, "" }, "\377", 1051, ZINT_WARN_NONCOMPLIANT, 105, 105, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 82*/ { BARCODE_AZTEC, -1, -1, -1, 25, -1, -1, { 0, 0, "" }, "\377", 1052, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 25, requires too many codewords (maximum 937)", 3, "" },
+ /* 83*/ { BARCODE_AZTEC, -1, -1, -1, 26, -1, -1, { 0, 0, "" }, "\377", 1091, ZINT_WARN_NONCOMPLIANT, 109, 109, "Warning 708: Number of ECC codewords 48 less than 5% + 3 of data codewords 972", 3, "" },
+ /* 84*/ { BARCODE_AZTEC, -1, -1, -1, 26, -1, -1, { 0, 0, "" }, "\377", 1092, ZINT_WARN_NONCOMPLIANT, 109, 109, "Warning 708: Number of ECC codewords 47 less than 5% + 3 of data codewords 973", 3, "" },
+ /* 85*/ { BARCODE_AZTEC, -1, -1, -1, 26, -1, -1, { 0, 0, "" }, "\377", 1141, ZINT_WARN_NONCOMPLIANT, 109, 109, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 86*/ { BARCODE_AZTEC, -1, -1, -1, 26, -1, -1, { 0, 0, "" }, "\377", 1142, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 26, requires too many codewords (maximum 1017)", 3, "" },
+ /* 87*/ { BARCODE_AZTEC, -1, -1, -1, 27, -1, -1, { 0, 0, "" }, "\377", 1258, ZINT_WARN_NONCOMPLIANT, 113, 113, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 88*/ { BARCODE_AZTEC, -1, -1, -1, 27, -1, -1, { 0, 0, "" }, "\377", 1259, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 27, requires too many codewords (maximum 917)", 3, "" },
+ /* 89*/ { BARCODE_AZTEC, -1, -1, -1, 28, -1, -1, { 0, 0, "" }, "\377", 1357, ZINT_WARN_NONCOMPLIANT, 117, 117, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 90*/ { BARCODE_AZTEC, -1, -1, -1, 28, -1, -1, { 0, 0, "" }, "\377", 1358, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 28, requires too many codewords (maximum 989)", 3, "" },
+ /* 91*/ { BARCODE_AZTEC, -1, -1, -1, 29, -1, -1, { 0, 0, "" }, "\377", 1459, ZINT_WARN_NONCOMPLIANT, 121, 121, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 92*/ { BARCODE_AZTEC, -1, -1, -1, 29, -1, -1, { 0, 0, "" }, "\377", 1460, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 29, requires too many codewords (maximum 1063)", 3, "" },
+ /* 93*/ { BARCODE_AZTEC, -1, -1, -1, 30, -1, -1, { 0, 0, "" }, "\377", 1566, ZINT_WARN_NONCOMPLIANT, 125, 125, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 94*/ { BARCODE_AZTEC, -1, -1, -1, 30, -1, -1, { 0, 0, "" }, "\377", 1567, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 30, requires too many codewords (maximum 1141)", 3, "" },
+ /* 95*/ { BARCODE_AZTEC, -1, -1, -1, 31, -1, -1, { 0, 0, "" }, "\377", 1676, ZINT_WARN_NONCOMPLIANT, 131, 131, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 96*/ { BARCODE_AZTEC, -1, -1, -1, 31, -1, -1, { 0, 0, "" }, "\377", 1677, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 31, requires too many codewords (maximum 1221)", 3, "" },
+ /* 97*/ { BARCODE_AZTEC, -1, -1, -1, 32, -1, -1, { 0, 0, "" }, "\377", 1789, ZINT_WARN_NONCOMPLIANT, 135, 135, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /* 98*/ { BARCODE_AZTEC, -1, -1, -1, 32, -1, -1, { 0, 0, "" }, "\377", 1790, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 32, requires too many codewords (maximum 1303)", 3, "" },
+ /* 99*/ { BARCODE_AZTEC, -1, -1, -1, 33, -1, -1, { 0, 0, "" }, "\377", 1907, ZINT_WARN_NONCOMPLIANT, 139, 139, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /*100*/ { BARCODE_AZTEC, -1, -1, -1, 33, -1, -1, { 0, 0, "" }, "\377", 1908, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 33, requires too many codewords (maximum 1389)", 3, "" },
+ /*101*/ { BARCODE_AZTEC, -1, -1, -1, 34, -1, -1, { 0, 0, "" }, "1", 4429, ZINT_WARN_NONCOMPLIANT, 143, 143, "Warning 706: Number of ECC codewords 3 at minimum", 1, "" },
+ /*102*/ { BARCODE_AZTEC, -1, -1, -1, 34, -1, -1, { 0, 0, "" }, "1", 4430, ZINT_ERROR_TOO_LONG, 0, 0, "Error 505: Input too long for Version 34, requires 1478 codewords (maximum 1477)", 1, "" },
+ /*103*/ { BARCODE_AZTEC, -1, -1, -1, 34, -1, -1, { 0, 0, "" }, "\377", 2028, ZINT_WARN_NONCOMPLIANT, 143, 143, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /*104*/ { BARCODE_AZTEC, -1, -1, -1, 34, -1, -1, { 0, 0, "" }, "\377", 2029, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 34, requires too many codewords (maximum 1477)", 3, "" },
+ /*105*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "1", 4699, ZINT_WARN_NONCOMPLIANT, 147, 147, "Warning 706: Number of ECC codewords 3 at minimum", 1, "" },
+ /*106*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "1", 4700, ZINT_ERROR_TOO_LONG, 0, 0, "Error 505: Input too long for Version 35, requires 1568 codewords (maximum 1567)", 1, "" },
+ /*107*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "A", 3590, ZINT_WARN_NONCOMPLIANT, 147, 147, "Warning 708: Number of ECC codewords 74 less than 5% + 3 of data codewords 1496", 1, "74 ECC codewords (1496 data codewords)" },
+ /*108*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "A", 3591, ZINT_WARN_NONCOMPLIANT, 147, 147, "Warning 708: Number of ECC codewords 73 less than 5% + 3 of data codewords 1497", 1, "" },
+ /*109*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "A", 3760, ZINT_WARN_NONCOMPLIANT, 147, 147, "Warning 706: Number of ECC codewords 3 at minimum", 1, "" },
+ /*110*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "A", 3761, ZINT_ERROR_TOO_LONG, 0, 0, "Error 505: Input too long for Version 35, requires 1568 codewords (maximum 1567)", 1, "" },
+ /*111*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "\377", 2149, ZINT_WARN_NONCOMPLIANT, 147, 147, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /*112*/ { BARCODE_AZTEC, -1, -1, -1, 35, -1, -1, { 0, 0, "" }, "\377", 2150, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 35, requires too many codewords (maximum 1567)", 3, "" },
+ /*113*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "1", 4753, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 708: Number of ECC codewords 79 less than 5% + 3 of data codewords 1585", 1, "79 ECC codewords (1585 data codewords)" },
+ /*114*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "1", 4981, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 1, "" },
+ /*115*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "1", 4982, ZINT_ERROR_TOO_LONG, 0, 0, "Error 803: Input length 4982 too long (maximum 4981)", 1, "" },
+ /*116*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "\377", 2279, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 3, "Much bit-stuffing" },
+ /*117*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "\377", 2280, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 36, requires too many codewords (maximum 1661)", 3, "" },
+ /*118*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "\240", 2486, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 3, "Less bit-stuffing" },
+ /*119*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "\240", 2487, ZINT_ERROR_TOO_LONG, 151, 151, "Error 502: Input too long, requires too many codewords (maximum 1661)", 3, "" },
+ /*120*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "\240A", 2486, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /*121*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 0, 0, "" }, "\240A", 2487, ZINT_ERROR_TOO_LONG, 151, 151, "Error 502: Input too long, requires too many codewords (maximum 1661)", 3, "" },
+ /*122*/ { BARCODE_AZTEC, -1, 899, -1, 36, -1, -1, { 0, 0, "" }, "\377", 2276, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /*123*/ { BARCODE_AZTEC, -1, 899, -1, 36, -1, -1, { 0, 0, "" }, "\377", 2277, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 36, requires too many codewords (maximum 1661)", 3, "" },
+ /*124*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 2, 3, "" }, "\377", 2276, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /*125*/ { BARCODE_AZTEC, -1, -1, -1, 36, -1, -1, { 2, 3, "" }, "\377", 2277, ZINT_ERROR_TOO_LONG, 0, 0, "Error 704: Input too long for Version 36, requires too many codewords (maximum 1661)", 3, "" },
+ /*126*/ { BARCODE_AZTEC, -1, 899, -1, 36, -1, -1, { 2, 3, "" }, "\377", 2273, ZINT_WARN_NONCOMPLIANT, 151, 151, "Warning 706: Number of ECC codewords 3 at minimum", 3, "" },
+ /*127*/ { BARCODE_AZTEC, -1, 899, -1, 36, -1, -1, { 2, 3, "" }, "\377", 2274, ZINT_ERROR_TOO_LONG, 0, 0, "Error 505: Input too long for Version 36, requires 1662 codewords (maximum 1661)", 3, "" },
};
const int data_size = ARRAY_SIZE(data);
int i, length, ret;
@@ -268,6 +269,151 @@ static void test_large(const testCtx *const p_ctx) {
testFinish();
}
+static void test_bs(const testCtx *const p_ctx) {
+ int debug = p_ctx->debug;
+
+ /* Cf `AZHighLevelEncoderTest::HighLevelEncodeBinary()` */
+ static int lens[] = {
+ 1, 2, 3, 10, 29, 30, 31, 32, 33, 34, 60, 61, 62, 63, 64, 65, 2076, 2077, 2078, 2079, 2080, 2100, 2230
+ };
+ const int lens_size = ARRAY_SIZE(lens);
+
+ int i, j, ret;
+ struct zint_symbol *symbol = NULL;
+
+ char buf[2230];
+
+ char escaped[9216];
+ char cmp_buf[32768];
+ char cmp_msg[1024];
+
+ /* Only do zxing-cpp test if asked, too slow otherwise, but not much of a test if not */
+ int do_zxingcpp = (debug & ZINT_DEBUG_TEST_ZXINGCPP) && testUtilHaveZXingCPPDecoder();
+
+ testStartSymbol(p_ctx->func_name, &symbol);
+
+ for (j = 0; j < 2; j++) {
+ for (i = 0; i < lens_size; i++) {
+ const int length = lens[i];
+
+ if (j == 1 && length <= 3) {
+ continue;
+ }
+ memset(buf, 0xA1 /*¡*/, length);
+ if (j == 1) {
+ /* Trigger `az_LatchMaybeAndAppend()` with 2 chars (`pairCode` == 3)
+ & `az_AddByteShiftChar()` with 2 chars and `deltaBitCount2` */
+ buf[length - 3] = '.';
+ buf[length - 2] = ' ';
+ }
+
+ symbol = ZBarcode_Create();
+ assert_nonnull(symbol, "Symbol not created\n");
+
+ testUtilSetSymbol(symbol, BARCODE_AZTEC, DATA_MODE, -1 /*eci*/,
+ 1 /*option_1*/, -1 /*option_2*/, -1 /*option_3*/,
+ -1 /*output_options*/, NULL, 0, debug | ZINT_DEBUG_TEST_AZTEC_SKIP_ALL);
+
+ ret = ZBarcode_Encode(symbol, TCU(buf), length);
+ assert_zero(ret, "i:%d ZBarcode_Encode(%d) ret %d != 0 (%s)\n", i, length, ret, symbol->errtxt);
+
+ if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, buf, length, debug)) {
+ int cmp_len, ret_len;
+ char modules_dump[22801 + 1];
+ assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)),
+ -1, "i:%d testUtilModulesDump == -1\n", i);
+ ret = testUtilZXingCPP(i, symbol, buf, length, modules_dump, 3 /*zxingcpp_cmp*/,
+ cmp_buf, sizeof(cmp_buf), &cmp_len);
+ assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n",
+ i, testUtilBarcodeName(symbol->symbology), ret);
+
+ ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, buf, length,
+ NULL /*primary*/, escaped, &ret_len);
+ assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n",
+ i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len,
+ escaped);
+ }
+
+ ZBarcode_Delete(symbol);
+ }
+ }
+
+ testFinish();
+}
+
+static void test_many_states(const testCtx *const p_ctx) {
+ int debug = p_ctx->debug;
+
+ static char modes_buf[6][6] = {
+ { 'A', 'B', ' ', 'C', 'D', 'E' }, /* AZ_U */
+ { 'a', ' ', 'b', 'c', 'd', 'e' }, /* AZ_L */
+ { '^', '_', '`', '\r', '|', '~' }, /* AZ_M */
+ { '#', '$', '%', '\r', '&', '}' }, /* AZ_P */
+ { '1', ',', ' ', '2', '3', ',' }, /* AZ_D */
+ { 'A', '*', '\016', '2', '1', '0' }, /* Single AZ_B () amongst non-AZ_B */
+ };
+
+ int i, j, k, ret;
+ struct zint_symbol *symbol = NULL;
+
+ const int length = 3191;
+ char buf[3191];
+
+ char escaped[9216];
+ char cmp_buf[32768];
+ char cmp_msg[1024];
+
+ /* Only do zxing-cpp test if asked, too slow otherwise */
+ int do_zxingcpp = (debug & ZINT_DEBUG_TEST_ZXINGCPP) && testUtilHaveZXingCPPDecoder();
+
+ testStartSymbol(p_ctx->func_name, &symbol);
+
+ for (i = 0; i < length; i += 36) {
+ for (j = 0; j < 6; j++) {
+ for (k = 0; k < 6 && i + j * 6 + k < length; k++) {
+ buf[i + j * 6 + k] = modes_buf[j][k];
+ }
+ if (i + j * 6 + k == length) {
+ break;
+ }
+ }
+ if (i + j * 6 + k == length) {
+ break;
+ }
+ }
+
+ symbol = ZBarcode_Create();
+ assert_nonnull(symbol, "Symbol not created\n");
+
+ testUtilSetSymbol(symbol, BARCODE_AZTEC, DATA_MODE, -1 /*eci*/,
+ 1 /*option_1*/, 36 /*option_2*/, -1 /*option_3*/,
+ -1 /*output_options*/, NULL, 0, debug);
+
+ ret = ZBarcode_Encode(symbol, TCU(buf), length);
+ assert_nonzero(ret < ZINT_ERROR, "ZBarcode_Encode(%d) ret %d >= ZINT_ERROR (%s)\n", length, ret, symbol->errtxt);
+
+ if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, buf, length, debug)) {
+ int cmp_len, ret_len;
+ char modules_dump[22801 + 1];
+ assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)),
+ -1, "i:%d testUtilModulesDump == -1\n", i);
+ ret = testUtilZXingCPP(i, symbol, buf, length, modules_dump, 3 /*zxingcpp_cmp*/,
+ cmp_buf, sizeof(cmp_buf), &cmp_len);
+ assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n",
+ i, testUtilBarcodeName(symbol->symbology), ret);
+
+ ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, buf, length,
+ NULL /*primary*/, escaped, &ret_len);
+ assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n",
+ i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len,
+ escaped);
+ }
+
+ ZBarcode_Delete(symbol);
+
+ testFinish();
+}
+
static void test_options(const testCtx *const p_ctx) {
int debug = p_ctx->debug;
@@ -318,11 +464,11 @@ static void test_options(const testCtx *const p_ctx) {
/* 24*/ { BARCODE_AZTEC, -1, -1, -1, 37, -1, { 0, 0, "" }, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 510: Version '37' out of range (1 to 36)", -1, 37, 0 },
/* 25*/ { BARCODE_AZTEC, -1, -1, -1, -2, -1, { 0, 0, "" }, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 510: Version '-2' out of range (1 to 36)", -1, -2, 0 },
/* 26*/ { BARCODE_AZTEC, GS1_MODE, READER_INIT, -1, -1, -1, { 0, 0, "" }, "[91]A", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 501: Cannot use Reader Initialisation in GS1 mode", -1, 0, 0 },
- /* 27*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, -1, { 0, 0, "" }, "[91]A", 0, 15, 15, "", (41 << 8) | 3, 1, 0 },
- /* 28*/ { BARCODE_AZTEC, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, -1, { 0, 0, "" }, "(91)A", 0, 15, 15, "", (41 << 8) | 3, 1, 0 },
+ /* 27*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, -1, { 0, 0, "" }, "[91]A", 0, 15, 15, "", (47 << 8) | 4, 1, 0 },
+ /* 28*/ { BARCODE_AZTEC, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, -1, { 0, 0, "" }, "(91)A", 0, 15, 15, "", (47 << 8) | 4, 1, 0 },
/* 29*/ { BARCODE_AZTEC, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, -1, { 0, 0, "" }, "(91)(", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 253: Malformed AI in input (brackets don't match)", -1, 0, 0 },
- /* 30*/ { BARCODE_AZTEC, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, -1, { 0, 0, "" }, "(91)\\(", 0, 15, 15, "", (41 << 8) | 3, 1, 0 }, /* Escaped parens now work without ESCAPE_MODE */
- /* 31*/ { BARCODE_AZTEC, GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, -1, -1, -1, { 0, 0, "" }, "(91)\\(", 0, 15, 15, "", (41 << 8) | 3, 1, 0 },
+ /* 30*/ { BARCODE_AZTEC, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, -1, { 0, 0, "" }, "(91)\\(", 0, 15, 15, "", (47 << 8) | 4, 1, 0 }, /* Escaped parens now work without ESCAPE_MODE */
+ /* 31*/ { BARCODE_AZTEC, GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, -1, -1, -1, { 0, 0, "" }, "(91)\\(", 0, 15, 15, "", (47 << 8) | 4, 1, 0 },
/* 32*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 26, -1, { 0, 0, "" }, "A", 0, 109, 109, "", (99 << 8) | 4, 26, 0 }, /* 22 layers */
/* 33*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 27, -1, { 0, 0, "" }, "A", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 709: Version '27' out of range for Reader Initialisation symbols (maximum 26)", -1, 27, 0 }, /* 23 layers */
/* 34*/ { BARCODE_AZTEC, -1, READER_INIT, 4, -1, -1, { 0, 0, "" }, "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377", ZINT_ERROR_TOO_LONG, -1, -1, "Error 506: Input too long for Reader Initialisation, requires 23 layers (maximum 22)", 4, 27, 0 }, /* 23 layers */
@@ -806,189 +952,283 @@ static void test_encode(const testCtx *const p_ctx) {
"00000000000000000000000000000000000000000000000000001"
"11111111111111111111111111111111111111111111111111101"
},
- /* 11*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "[01]03453120000011[17]120508[10]ABCD1234[410]9501101020917", -1, 0, 23, 23, 1, 1, "#189 Follow embedded FLG(n) with FLG(0)",
- "00100000101111000100100"
- "00011101100110001010000"
- "00000111000111101011011"
- "01000001010100001100010"
- "00001001100110000111110"
- "00011011111000110101101"
- "00001011100111101111110"
- "11000111111111111010000"
- "11001101000000010111110"
- "00111011011111010111110"
- "01000001010001011110010"
- "00011001010101011111101"
- "01101111010001011110011"
- "10011001011111011011100"
- "01011011000000010010110"
- "00011101111111111001100"
- "10101100110111100001101"
- "10110101111100111010001"
- "11101001010000011001110"
- "00101010101010001111001"
- "11000101000100100000100"
+ /* 11*/ { BARCODE_AZTEC, GS1_MODE, 0, -1, -1, -1, -1, { 0, 0, "" }, "[01]03453120000011[17]120508[10]ABCD1234[410]9501101020917", -1, 0, 23, 23, 1, 1, "#189 Follow embedded FLG(n) with FLG(0)",
+ "11011101100110001010000"
+ "11010000010111100010010"
+ "00001001101110100000101"
+ "00000100010100111001011"
+ "00000001011011100111101"
+ "00011001110000101011000"
+ "00000111100111101101111"
+ "01001111111111111100000"
+ "00011101000000010010001"
+ "00100011011111010010001"
+ "10000101010001011110001"
+ "00110101010101011010000"
+ "11001011010001011000011"
+ "00101101011111011011010"
+ "10101111000000010101101"
+ "01111101111111111111100"
+ "01011000110111100111100"
+ "01110110101100010101010"
+ "10001110000101100110111"
+ "01001010001001000011100"
+ "11101010101010001110010"
+ "11011000000000000101001"
"00010001010101010101011"
- "11101100000000000010110"
},
- /* 12*/ { BARCODE_AZTEC, GS1_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "[01]03453120000011[17]120508[10]ABCD1234[410]9501101020917", -1, 0, 23, 23, 1, 1, "Same as above",
- "00100000101111000100100"
- "00011101100110001010000"
- "00000111000111101011011"
- "01000001010100001100010"
- "00001001100110000111110"
- "00011011111000110101101"
- "00001011100111101111110"
- "11000111111111111010000"
- "11001101000000010111110"
- "00111011011111010111110"
- "01000001010001011110010"
- "00011001010101011111101"
- "01101111010001011110011"
- "10011001011111011011100"
- "01011011000000010010110"
- "00011101111111111001100"
- "10101100110111100001101"
- "10110101111100111010001"
- "11101001010000011001110"
- "00101010101010001111001"
- "11000101000100100000100"
+ /* 12*/ { BARCODE_AZTEC, GS1_MODE | FAST_MODE, 0, -1, -1, -1, -1, { 0, 0, "" }, "[01]03453120000011[17]120508[10]ABCD1234[410]9501101020917", -1, 0, 23, 23, 1, 1, "Same as above",
+ "11011101100110001010000"
+ "11010000010111100010010"
+ "00001001101110100000101"
+ "00000100010100111001011"
+ "00000001011011100111101"
+ "00011001110000101011000"
+ "00000111100111101101111"
+ "01001111111111111100000"
+ "00011101000000010010001"
+ "00100011011111010010001"
+ "10000101010001011110001"
+ "00110101010101011010000"
+ "11001011010001011000011"
+ "00101101011111011011010"
+ "10101111000000010101101"
+ "01111101111111111111100"
+ "01011000110111100111100"
+ "01110110101100010101010"
+ "10001110000101100110111"
+ "01001010001001000011100"
+ "11101010101010001110010"
+ "11011000000000000101001"
"00010001010101010101011"
- "11101100000000000010110"
},
- /* 13*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "[01]95012345678903[3103]000123", -1, 0, 19, 19, 1, 1, "#189 Follow embedded FLG(n) with FLG(0)",
- "0000000100001010101"
- "0001101111011000000"
- "0111100100010110100"
- "0011000110100100110"
- "0010110101010010110"
- "0101111111111110101"
- "0011110000000101000"
- "0101010111110100011"
- "1101110100010110100"
- "1000010101010111010"
- "0011110100010100110"
- "1000110111110111110"
- "0010110000000101010"
- "1111011111111111101"
- "1001001111001000100"
- "1111111110110100011"
- "0111000111101011001"
- "1000110111011000101"
- "1010100000101101001"
+ /* 13*/ { BARCODE_AZTEC, GS1_MODE, 0, -1, -1, -1, -1, { 0, 0, "" }, "[01]95012345678903[3103]000123", -1, 0, 19, 19, 1, 1, "#189 Follow embedded FLG(n) with FLG(0)",
+ "1101000111011000000"
+ "1100001110000101010"
+ "0011000101000001110"
+ "0010100001111100101"
+ "0010110101010010001"
+ "0100111111111111100"
+ "0010110000000100110"
+ "0000010111110100001"
+ "0110110100010111010"
+ "0001010101010111101"
+ "0111110100010100101"
+ "0001110111110111001"
+ "0110110000000100101"
+ "1110011111111110000"
+ "0100001111001000010"
+ "1010000101010111101"
+ "1101100110110000110"
+ "0101000001011010110"
+ "1000110111011000110"
},
- /* 14*/ { BARCODE_AZTEC, GS1_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "[01]95012345678903[3103]000123", -1, 0, 19, 19, 1, 1, "Same as above",
- "0000000100001010101"
- "0001101111011000000"
- "0111100100010110100"
- "0011000110100100110"
- "0010110101010010110"
- "0101111111111110101"
- "0011110000000101000"
- "0101010111110100011"
- "1101110100010110100"
- "1000010101010111010"
- "0011110100010100110"
- "1000110111110111110"
- "0010110000000101010"
- "1111011111111111101"
- "1001001111001000100"
- "1111111110110100011"
- "0111000111101011001"
- "1000110111011000101"
- "1010100000101101001"
+ /* 14*/ { BARCODE_AZTEC, GS1_MODE | FAST_MODE, 0, -1, -1, -1, -1, { 0, 0, "" }, "[01]95012345678903[3103]000123", -1, 0, 19, 19, 1, 1, "Same as above",
+ "1101000111011000000"
+ "1100001110000101010"
+ "0011000101000001110"
+ "0010100001111100101"
+ "0010110101010010001"
+ "0100111111111111100"
+ "0010110000000100110"
+ "0000010111110100001"
+ "0110110100010111010"
+ "0001010101010111101"
+ "0111110100010100101"
+ "0001110111110111001"
+ "0110110000000100101"
+ "1110011111111110000"
+ "0100001111001000010"
+ "1010000101010111101"
+ "1101100110110000110"
+ "0101000001011010110"
+ "1000110111011000110"
},
- /* 15*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "[01]04610044273252[21]LRFX)k\\R06\\G+/ACMRN123456/V2009121908334\\R\\E", -1, 0, 23, 23, 1, 1, "HIBC/PAS Section 2.2 Patient Id Macro, same",
+ /* 23*/ { BARCODE_AZTEC, ESCAPE_MODE, -1, -1, -1, 3, -1, { 0, 0, "" }, "[)>\\R06\\G+/ACMRN123456/V2009121908334\\R\\E", -1, 0, 23, 23, 1, 1, "HIBC/PAS Section 2.2 Patient Id Macro, same",
"11000001111110000001101"
"11110100010110110001101"
"10011001100011001111001"
@@ -1097,7 +1337,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01000110011100010011000"
"01000101001001110111010"
},
- /* 22*/ { BARCODE_AZTEC, DATA_MODE | ESCAPE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "[)>\\R06\\G+/ACMRN123456/V2009121908334\\R\\E", -1, 0, 23, 23, 0, 1, "HIBC/PAS Section 2.2 Patient Id Macro **NOT SAME** different encodation, Zint 1 codeword longer; BWIPP same as figure",
+ /* 24*/ { BARCODE_AZTEC, DATA_MODE | ESCAPE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "[)>\\R06\\G+/ACMRN123456/V2009121908334\\R\\E", -1, 0, 23, 23, 0, 1, "HIBC/PAS Section 2.2 Patient Id Macro **NOT SAME** different encodation, Zint 1 codeword longer; BWIPP same as figure",
"11010110110000110111011"
"10111111001000110100000"
"11000001011011010011010"
@@ -1122,7 +1362,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11110110111110011000100"
"10110000010101011110010"
},
- /* 23*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE, -1, -1, 3, -1, -1, { 0, 0, "" }, "/EO523201", -1, 0, 19, 19, 1, 1, "HIBC/PAS Section 2.2 Purchase Order, same",
+ /* 25*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE, -1, -1, 3, -1, -1, { 0, 0, "" }, "/EO523201", -1, 0, 19, 19, 1, 1, "HIBC/PAS Section 2.2 Purchase Order, same",
"0011100011001101111"
"0010011001010110110"
"0110100100101000000"
@@ -1143,7 +1383,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0111011100001111101"
"1010000000101001001"
},
- /* 24*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, 3, -1, -1, { 0, 0, "" }, "/EO523201", -1, 0, 19, 19, 1, 1, "Same as above",
+ /* 26*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, 3, -1, -1, { 0, 0, "" }, "/EO523201", -1, 0, 19, 19, 1, 1, "Same as above",
"0011100011001101111"
"0010011001010110110"
"0110100100101000000"
@@ -1164,7 +1404,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0111011100001111101"
"1010000000101001001"
},
- /* 25*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "/KN12345", -1, 0, 19, 19, 1, 1, "HIBC/PAS Section 2.2 Asset Tag, same",
+ /* 27*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "/KN12345", -1, 0, 19, 19, 1, 1, "HIBC/PAS Section 2.2 Asset Tag, same",
"0011111101100100110"
"0010011100111110101"
"0111110010101101110"
@@ -1185,7 +1425,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0010000010110001111"
"1001101110111100011"
},
- /* 26*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "/KN12345", -1, 0, 19, 19, 1, 1, "Same as above",
+ /* 28*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "/KN12345", -1, 0, 19, 19, 1, 1, "Same as above",
"0011111101100100110"
"0010011100111110101"
"0111110010101101110"
@@ -1206,7 +1446,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0010000010110001111"
"1001101110111100011"
},
- /* 27*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "A123ABCDEFGHI1234567891/$$420020216LOT123456789012345/SXYZ456789012345678/16D20130202", -1, 0, 27, 27, 1, 1, "IDAutomation example, same",
+ /* 29*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "A123ABCDEFGHI1234567891/$$420020216LOT123456789012345/SXYZ456789012345678/16D20130202", -1, 0, 27, 27, 1, 1, "IDAutomation example, same",
"001010100100100010000010110"
"000110110110001000101000100"
"010010001101110110001000110"
@@ -1235,7 +1475,7 @@ static void test_encode(const testCtx *const p_ctx) {
"011010111000111110011011110"
"000010010001000011010000001"
},
- /* 28*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "A123ABCDEFGHI1234567891/$$420020216LOT123456789012345/SXYZ456789012345678/16D20130202", -1, 0, 27, 27, 1, 1, "Same as above",
+ /* 30*/ { BARCODE_HIBC_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "A123ABCDEFGHI1234567891/$$420020216LOT123456789012345/SXYZ456789012345678/16D20130202", -1, 0, 27, 27, 1, 1, "Same as above",
"001010100100100010000010110"
"000110110110001000101000100"
"010010001101110110001000110"
@@ -1264,7 +1504,7 @@ static void test_encode(const testCtx *const p_ctx) {
"011010111000111110011011110"
"000010010001000011010000001"
},
- /* 29*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\377\000\000\377\300\000\017\377\376\217\300\017", 12, 0, 19, 19, 1, 899, "6 bit words",
+ /* 31*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\377\000\000\377\300\000\017\377\376\217\300\017", 12, 0, 19, 19, 1, 899, "6 bit words",
"1101000001111000001"
"1101011000011100000"
"1000001010001001001"
@@ -1285,7 +1525,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1011110000001001011"
"0011111100000000010"
},
- /* 30*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\377\000\000\377\300\000\017\377\376\217\300\017", 12, 0, 19, 19, 1, 899, "Same as above",
+ /* 32*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\377\000\000\377\300\000\017\377\376\217\300\017", 12, 0, 19, 19, 1, 899, "Same as above",
"1101000001111000001"
"1101011000011100000"
"1000001010001001001"
@@ -1306,7 +1546,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1011110000001001011"
"0011111100000000010"
},
- /* 31*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 3, -1, { 0, 0, "" }, "\377\377\377\377\377\000\000\000\000\377\377\377\000\000\377\377\377\377\000\000\000\000\000", 23, 0, 23, 23, 1, 899, "8 bit words",
+ /* 33*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 3, -1, { 0, 0, "" }, "\377\377\377\377\377\000\000\000\000\377\377\377\000\000\377\377\377\377\000\000\000\000\000", 23, 0, 23, 23, 1, 899, "8 bit words",
"11111111111111111100000"
"11011101110111011110001"
"11110110111011010101100"
@@ -1331,7 +1571,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11011100001000100010010"
"11111110000000000000000"
},
- /* 32*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 3, -1, { 0, 0, "" }, "\377\377\377\377\377\000\000\000\000\377\377\377\000\000\377\377\377\377\000\000\000\000\000", 23, 0, 23, 23, 1, 899, "Same as above",
+ /* 34*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 3, -1, { 0, 0, "" }, "\377\377\377\377\377\000\000\000\000\377\377\377\000\000\377\377\377\377\000\000\000\000\000", 23, 0, 23, 23, 1, 899, "Same as above",
"11111111111111111100000"
"11011101110111011110001"
"11110110111011010101100"
@@ -1356,7 +1596,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11011100001000100010010"
"11111110000000000000000"
},
- /* 33*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 13, -1, { 0, 0, "" }, "\000\000\000\377\377\000\000\000\000\377\377\377\377\000\377\377\377\377\000\000\377\000\000", 23, 0, 53, 53, 1, 899, "10 bit words",
+ /* 35*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 13, -1, { 0, 0, "" }, "\000\000\000\377\377\000\000\000\000\377\377\377\377\000\377\377\377\377\000\000\377\000\000", 23, 0, 53, 53, 1, 899, "10 bit words",
"00011010011110010011110101110010000000111111010101001"
"00000010100101010010001000010100000010101101001111110"
"11101010001110100001111100110101111010110110110001010"
@@ -1411,7 +1651,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101111010111010000111101011101111011000000001011100"
"11111111111111110000111111111111111111100010000011111"
},
- /* 34*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 13, -1, { 0, 0, "" }, "\000\000\000\377\377\000\000\000\000\377\377\377\377\000\377\377\377\377\000\000\377\000\000", 23, 0, 53, 53, 1, 899, "Same as above",
+ /* 36*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 13, -1, { 0, 0, "" }, "\000\000\000\377\377\000\000\000\000\377\377\377\377\000\377\377\377\377\000\000\377\000\000", 23, 0, 53, 53, 1, 899, "Same as above",
"00011010011110010011110101110010000000111111010101001"
"00000010100101010010001000010100000010101101001111110"
"11101010001110100001111100110101111010110110110001010"
@@ -1466,7 +1706,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101111010111010000111101011101111011000000001011100"
"11111111111111110000111111111111111111100010000011111"
},
- /* 35*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 27, -1, { 0, 0, "" }, "\377\377\377\000\000\377\377\377\377\000\000\000\000\377\000\000\000\000\377\377\000\377\377\377\000\000\000", 27, 0, 113, 113, 1, 899, "12 bit words",
+ /* 37*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 27, -1, { 0, 0, "" }, "\377\377\377\000\000\377\377\377\377\000\000\000\000\377\000\000\000\000\377\377\000\377\377\377\000\000\000", 27, 0, 113, 113, 1, 899, "12 bit words",
"11111010101001000010110010110110001010111011100001100010111010111011011110010101111001111110001101011111100000011"
"11111001010001010111110100101000101000010110010011001000011010011001111000010101011110010001110101100110011001100"
"11101100111000011000000011000001001001111001111110000001110100001110010010001100100011101110000011010101101011011"
@@ -1581,7 +1821,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11000000001000001011101101101101101001100000101000000000010111000000100101000110010000110010000011000101011111000"
"11100000100000001110111110110000111110011100000010001110101010101111000011001011111001101101010010001011111011101"
},
- /* 36*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 27, -1, { 0, 0, "" }, "\377\377\377\000\000\377\377\377\377\000\000\000\000\377\000\000\000\000\377\377\000\377\377\377\000\000\000", 27, 0, 113, 113, 1, 899, "Same as above",
+ /* 38*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 27, -1, { 0, 0, "" }, "\377\377\377\000\000\377\377\377\377\000\000\000\000\377\000\000\000\000\377\377\000\377\377\377\000\000\000", 27, 0, 113, 113, 1, 899, "Same as above",
"11111010101001000010110010110110001010111011100001100010111010111011011110010101111001111110001101011111100000011"
"11111001010001010111110100101000101000010110010011001000011010011001111000010101011110010001110101100110011001100"
"11101100111000011000000011000001001001111001111110000001110100001110010010001100100011101110000011010101101011011"
@@ -1696,7 +1936,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11000000001000001011101101101101101001100000101000000000010111000000100101000110010000110010000011000101011111000"
"11100000100000001110111110110000111110011100000010001110101010101111000011001011111001101101010010001011111011101"
},
- /* 37*/ { BARCODE_AZTEC, UNICODE_MODE, -1, READER_INIT, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "",
+ /* 39*/ { BARCODE_AZTEC, UNICODE_MODE, -1, READER_INIT, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "",
"000011000111101"
"001110010011000"
"011100100000100"
@@ -1713,7 +1953,7 @@ static void test_encode(const testCtx *const p_ctx) {
"110110000101100"
"010001010010110"
},
- /* 38*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, READER_INIT, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "Same as above",
+ /* 40*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, READER_INIT, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "Same as above",
"000011000111101"
"001110010011000"
"011100100000100"
@@ -1730,7 +1970,7 @@ static void test_encode(const testCtx *const p_ctx) {
"110110000101100"
"010001010010110"
},
- /* 39*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "121212121abcd", -1, 0, 19, 19, 1, 1, "#210",
+ /* 41*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "121212121abcd", -1, 0, 19, 19, 1, 1, "#210",
"1101101111001101010"
"1101111011110110000"
"0001111101100010000"
@@ -1751,7 +1991,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0011111001001010011"
"1001101000100100001"
},
- /* 40*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "121212121abcd", -1, 0, 19, 19, 1, 1, "#210, same as above",
+ /* 42*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "121212121abcd", -1, 0, 19, 19, 1, 1, "#210, same as above",
"1101101111001101010"
"1101111011110110000"
"0001111101100010000"
@@ -1772,7 +2012,165 @@ static void test_encode(const testCtx *const p_ctx) {
"0011111001001010011"
"1001101000100100001"
},
- /* 41*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "4\000:", 3, 0, 19, 19, 1, 1, "",
+ /* 43*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "\275>>a\373-7D|\350g\250)5^l\016\363\222Q\030\240\366Y\324\315\361\222\2665\177w\214k\371\320\232q+\361\365>7`W\342lh\224\356\312\312\256\332\201\013\3739\310\035\257\031+A\273\303=\213\271\372{\205!\006)y\371\264\026\307c\212d>\224\311\211\003\342\331\245\356\266y\321\036\004\241|\333\234\355.\347\214C\261f\355\300\022{x\027\366\220\021\230\006M\362>\220\016\370\231\301\004Vi\302n\002\232\275\201\214\340L\346\234C\005\202c\362X\362\272<\373\350\236\351\272-V\330j\274\014\212\007\367\012\306\232%\020y\351\233a\322\324p@f\225\0176\363.\251Ml\326\021E\223Xj\274\006.\327\376\267\316$c\206\340g\307\024\365\005\253\2030x1\225\305jY\323S\213_~0Mp\002bF\335\374f\366\016\357\354Jj\252\356\217\015\210=\003*7\220\266\037t\025?=\276\335\310\246Ct\333)d\356\331\367\3131\026\376t`\225\317\344Pl=\361\211\304\02205\036!)~\230s\006\321fjs\\f\335\256|C|\212\243-\311\366g<\211\215d;\202\255\333,\273\225\316\311\272Q!\246\367\012\352I\2135\240\021\301\007\322\217\012$\020\214\031hI\0164\356Z\264\216R\370\203G\203.I\303\217\261\006\227\214\245\037\351$\2069\003\271\272d\014\313*\216\364\014h\354F\247\003\023\265T\355Q\266\035\222\252gx\220K\352\337m\241?d-\357i\233\363\022\034\276\313\323\332>\354\021\3321\272\326\367\357v\243\3068I\212\243\327!\352Dj\234\014\0213W'\331\301l:\345\340.\004\375\375\030>\201}\222r\322\257\205\335\312^\201!WbH\256\006\005>0\351:\345z\010\303+\2033*\002\336&e\306\225Tr\325\2346\177L\0069\342\023\"z\310\206A\243V\033\034B\220\362\010\027\365\236]\275\0067\216`W\022W)\304>\356+\335\323\311\363\357\253{\005j\236D\376\352\233\035\341\324:\342\303\354\337T|64\013\252/\036\372\303\326T\002\370\347\233\233\251\360qR\315g\361\224\242\370mKO8\"\345\332\231\277\213?\242_T3\223\274\247\227\035\260\322\221:\206\320\210hU\0332\332v\372,U\227\306\257M\237\"ek\266kv\032Um\374\323R\257\034\217\034\305\010\235\265=\215;\201\006\374\327%\204\265X\372\256\026XB@\357y\007\033E\235=\204).zM\226^\327\275\364\177\022u\361v\032\2225\225\210ef<\0133\252\023\220\364\012\351\2026\004X\301\022D'\016\216\337}Y\007uJ#\014\030\221" "\022\030\214\215\345C%*\201\276\016ZE\314$~\234\214\2275v\210\270I\364W\322\022\354\254`\225\312\005\306\2078\351LgP\357\225C\313Fmz~D>\364\024W\323h\321W\025\205r\207i\2377\030\2479V\025d\264\225\362\365\"\237H\031\033\263Y\364\320+\203C\245\366\331\2558\021\250T\250y1\001\0267w0h\257\264\271\366\263\254\245\034\226k\254\021\322U\3416\307\001'\235\336\034Y/:7`t\012N\336\344&\005q0@%\313G\271\264g#\324\305~d\330K\316V\251\276\2247\232f `\245P,uI\012\034I\266\206\260s\241G9\200i\275,)-\232\004\226@\374<\374X\360eR\242\257\375\\\301\277\336\362\300\006-/3kJ\267\036\205\302\360\205\323*\270\242\3035\312\260\020e!\020\323m\214\222\217{\265\3632\277\004\017v\223\252h\215\243\027D#O\034\024vE.l%\335w\037\014\362\330Q\222\3349@`\361\204\343\302\272=\211\213\302j\357\370w\0322\312X\222,\331f'AL\261\2574\307\243\214\357O\275\254\317A\355\363e2=\360\006A6\255\215w\366x\351c\252\006\276\335\364\365\024fz\360J\263\313 -\013\302\2376\010\215bP\254\355\241\352`\023h\351;\300\312<\264D^\3765\374\322(\"\356\275c\272\345\023:\371\271\220$\036\310\272zyQ(\203W\317;P\013\026\274\263\354\344\254\363\277\241\374\3644\262\371-\032\306\356\017uix=Z\200\320\242G\222\305\360A\220\220\365m\350\310\237#\361/(A\365\256W\214.\230\335\203\\\322\366\321[k\226\356Oe\253\002y\001\002\304\330`\353\205t\016\223\367\356%\272\013\330\314\366\026\2253\274\331\347U\034\243W\217\336j&&$\223\224N\205\004/@qDb\012\237,\315lf\303\013\0036\364\376=\035\0270\213\003%\252\217|!\326\375\245+N\307HR\333\250\336Yd\021\2632p\230`\022R\0339\302\303\027\323\321@lK$W\030", -1, 0, 131, 131, 1, 899, "Ticket #347",
+ "10101010001001111011000111011001000001110101011010010010100110101000110101101011001111000010001100101110110110010011100101100011000"
+ "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
+ "10101000000011011010000110111010000000101111010000111000010110111011001110101110100110001100001100000010110101111011001101011011100"
+ "11011101000111010110111111101010010100000011110101010011111111000110111011101100011110111101010001110010100010001110011110110110010"
+ "00000111100101110010011101011000100101000001001000001011101100110011000100101001101000010001001000110001010011111000000011000010001"
+ "01000011011001001100100011010010010010010000001101000111100100110110000011101000110010001000011111010010001011001101001010111101010"
+ "10000111100101100001000110010001001000000101100110011001100000010000000110010110100100111111001010110110010000011011010111010011100"
+ "11000110111000011100010111111110110001000001110101010010110011011111001111101010110010001100001011010001100011111100000001000011010"
+ "00111111110000111010010001110111000001110001100110111001100001010011010100010100000001000101111000000111100101001010111101011100101"
+ "11000010011000001100001100110011110111111101011001100010010011110101111010100001011110101011000011110010111000110111011100011011010"
+ "00010101010101111011000010101001100000011010111100011011111000010001101001101111101111000011011110000001110111111011101101001100100"
+ "01101001111011110110001000100110111001000011001111110010011001111101110100100010110110011101110111100000110101101110001101001000011"
+ "00110100100111011011000010000100100001111111101000001100010010100010111100000011101001010110001100101010000010100011010111111000100"
+ "11111010110101110110110010010110010101110000011111000010100010100110001111110111110010010000001111111011100100011100110010100111011"
+ "10011010101000010001000111011010001100100001101000010010011101111000010011000001100100011101011010000101001010101001110101001010001"
+ "11010001000111000110001111000101110010110110011111110110010001101101101001111100111101001001001011100110110001001101111101111011010"
+ "00101111011110011010001010101110101100100010011010010110100000100011010001100001000100000111111010001010000110111010001011000100100"
+ "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
+ "10100010110010010010000001011110000011000111000110011100001100110010110011000100000010011011111100100101111111110010011001011000101"
+ "11101010001111110110111110100100011001110010001111001011110011101101011100110100010001101111011111100010100011111110001011111111111"
+ "00011010101111010000110111011011100101001000110100110110010100101010011100010110101010000100011000010010001011110011101001100110100"
+ "01111011110010000100001101111100111110101101110011001011110011010100000101010100110101101001010011101101011001010101000111001100010"
+ "10101010010011101001010111000101001110000100110100100000011010001010100000000000001011000011000110111000011101110011010110100111001"
+ "11100011001100111101011001101110011000011010100111011111010011001101000111111100111100110101000111101111110100000111100110101000010"
+ "00010011001001001000000110100101000111100101000000000001101111110001110111010101100011000010001100101001000010010000011010111001101"
+ "11100110101011011110011000111111110100111111110101011010010111001101111110000000011101101101000111110011101011110111110100011000010"
+ "00000010101110011001010100001100001111001001000100011110100111110001000011001011100001110000100010110111111001110010010111111010100"
+ "01000111111101000111101100100010011010101011110011011000111100110100001101110001111010110101010111101100001101101110001010010000110"
+ "10101011111101110001001000101110101101101000100010001010101011101001001110000000001010110110001110000101110001101001010111110011000"
+ "11111000000110010110011010001011010111010100011001100110100110010110110110111001011000000010000011110001001001001101001110101110111"
+ "10101010100001110011100011100111000110111001000010101111110101000011011111000011001010011101000110111000000111101010101111111001100"
+ "01111110010101010111010000011011111111100011001101110110001011000100011001111001111000101011111001010010100111000111111111111111010"
+ "10011100011101000001101111101000000011011000100010010010110100010010100010010001001110100001010000111010000001011011010110111011101"
+ "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
+ "00100000110100101011101111010101101110011000001010101101010010101000111100110100001100001010000110010001000011000010001000010001001"
+ "01101011011001111100110111110111011000110110011111110101111011110101010010010100111011001010101011010000011001100110111101110110111"
+ "10000101010001010010101000011110001011010001111110110111010011100000110010001110101111000000101010010100100000001010100100100010000"
+ "11011110011001101100011101011010111000110000010101011100101001010101010000011001111100100110010101100110010101011100000101111111011"
+ "00100001110010001001011100111100001100111000010100011110000011010001010010100011001110011111110110001101110100010010000111010111100"
+ "11011011101010010100011011110111010010010001100101010101011101001111100010111111010110000010001101101010011010100111110100010111111"
+ "10110000001111010011010101001010001101100110100010100110000000010001001111111011000100001000111010001000011111111000110010101011001"
+ "11000000000110000100101000111010010000010011010111010011011010001100000110111110111011101000010111011010100111001100101010100011010"
+ "10000010110000111000001101010000000101111110010100011010110000011000111111101001001101111100110000010010000011000001111101111101000"
+ "01010111011010100100000001111010010100111101011101010100000100011101111001011001011100000100101011000000010110001110000011100001011"
+ "10000100111110011010001001001011100101101110001000111011110111000010001111110111101100011101101010111110111101111001000001111010001"
+ "01000100101001001110101011111110011100010101010011001111110110010100001100011011110011100100111001100101101100011111001101000011110"
+ "10110001100110110011000110000101100110101111110110010100011100000000100111100110101100111010010000001011110111010001100100011010101"
+ "11100000000110110110001001101010111001100000000011101011010110110100110010010011111101101101010111011000111100001111101110100110010"
+ "10010011000001111000110110001100100001100101000100100011001010111011000110010011001011111000001110101100010001111001100101001100101"
+ "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
+ "00110100110110011010000011000101000000000010100000001101101110010010000000100010001110101111001000101010101010110011101000101011101"
+ "11111010001011101101100110010100011110011000111111110101011100101110000111110000110101101101110011100001010001100101011001110100111"
+ "00100011100111100010101100001101101010010000011010010001010001110011011100001111000111010000011010001101010001001010011111011100000"
+ "01011011000000111100011001100001111011011000011011110011011001010111011101111110010101110101111011000000110110011100000001110000111"
+ "00001000010110011000001101001010001111010100001100011011101100000010001001000101101011001111010010110110000011011011101101001101101"
+ "11100010110011011110001101001100011101001111100001101101110101001111000000000011111100101101100101001001101011110101010100010011011"
+ "00011101110110100000101010110100001101100011000000010111101101010011101100001000100010000101100110010101101011000000101000001110000"
+ "11110110011011010100000011111101010000010101010001000011011101010111100011100001011111101010000011110000000011000101001100000110110"
+ "10100110110011100000100000010110101000011101110100010111101111010001110010001001000000100001011100001110110111001000011011011110100"
+ "01101001111000010101000001101101111001011000100111100001011111111111111111110000010111011010010001100000000110000100011000101110010"
+ "00100101100111000000010001010000100011111000100000001000011100000000000101001100101110101010100100001101011100111000011111110011101"
+ "01011000101111101110101110001010111011001100001101100101011101111111110100110110110111010111110011010000001001101101000110101000010"
+ "00001011000100011011100010010111100101111101000100010110110101000000010110101010001000001111011100111101001111000000110100110100000"
+ "01111010010001011110011011011101010111110011110111010101000101011111010100001111111011110000111011000101010100010101110011111111011"
+ "00100101001001101001100001111001100000100111110000001000001101010001010110010010101011110011011100000110000101101010011111100101000"
+ "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
+ "00000110000111111001110000011101000111101011101100101001110101010001010111111100100000111010100100000000110011000001100001001001000"
+ "11000000001100110110011001000001011110101100111011110000001101011111010110011110110001100100010011101110100000100100001010101010110"
+ "00101001101001010010100100111000000001000101010100000101010101000000010111001000100110100100111010101111010110000011100000110101001"
+ "11001110101101000100111010111101010000101101100111010111100101111111110111101000111001110100101011100010000110010111011011011000011"
+ "10000110011101100011001100010111000010011010110100010011010100000000000110110010100110011000011000001110000111111000100100110011000"
+ "11011101000101110111010100000110111010101000101101101011100111111111111110101100011100100100010111001110011100000100001100101001010"
+ "10001111100010110001100101110111001011101111001100111001000010000000000001111011100011000111110000111101001110111010101101011000101"
+ "11101101100011100111010101111011011101001110000001010010011011000110111001011001011001100010111011010001010001101110000001011001110"
+ "10101100011101010000001001000010101000001101001100100100111001000011001000001101100001110110111110001111101011010010111111111001101"
+ "01011000100011110111101111100000011100110100101111111011000110001100110101111110011010110001000001001110111100010101000110100000111"
+ "10110001000101111001010000100101100111101110110110000000000011100011010001001010000011111000101000111010111100001001001011101001000"
+ "01111100100101011110010111100000011000011011010101101101111101100100110101110110111010101001010011011010100111100101100101010100110"
+ "10000100110111010010001001001100001100011001000010001101011001011010101100000101101110011001001110001011110110010000010111101100101"
+ "01000100010000010100011001101111110110110001000111101100000111011110010101001100111111110011100101000101010100010100001101111111111"
+ "00000011001111101011111100010010100010011111111100110001011001110000001000001111001101111001100010001000000110000010011000110101101"
+ "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
+ "00111111011111110000101000011010101010000000000110111110111011001000000111001000101101010011110000010100001100101010001011101001000"
+ "11100110011111111111111111000011010001111000011101000101011101100110100010001101111011010010010001100101111110110111011011100010111"
+ "00101101100101001010111110010001000111010011001100100110010011111000010101110111101100001001101100101011110010010000001100010101100"
+ "11110011101000000101011111000011110101111110011001000010100100101100011111011001010101001111001101010110110001101101100011110010111"
+ "10001111110111001000111011001011101100010110000000110101011000111001110000111110001111011100001010110000000101001000000101000111100"
+ "01111101100000110101011100010010011111010001110011100000101011110111010001001001011011011001001111000011001000011100111101001101110"
+ "10100110101100010011100010100011000011010110010110011011101000011001110111110000100010111110010110001011101100110000001111101101000"
+ "01000010011101100110101110100101110111011100101011011011001111100111000101001001110100001010101001111010110101111111000111010010111"
+ "10000111001011010010111110100100101000100000000100111010100101010010100101101000101001000101010100000010110110100010010011001101001"
+ "01110110100011010110110011111010111110110001001011101101110001000100011101011000010011011000000011111010100011010101101101011001111"
+ "00001010010001110001100111110010100010111010110100011010011010011011001011000011100010111010011000110111100111011001000100101000100"
+ "11010101001011111110011111101001111101011101001011100101110111101101111100100010110100101100110011101000100110100110010100011110011"
+ "10001110111011010000100110010101101000110010000110010111100101110000011011100101101110101001110010110111110100000010100100110110100"
+ "01011100001110000110010001111001011101010101011011111101100111010101110011011101011000101101001101011111001111100111000010111110010"
+ "10000110001111010010101010101110000111000000011110011101111010000010001011100010100111001000011100100000010110000000100100100111001"
+ "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
+ "00011101111001110011011100010010000110010101100110000100101101001001110110011100001011011000001000000110010010111011001000111010101"
+ "11101010000001011111010011110011110010010000110111111010110010010100000110101010110010100100000101010011101100100101101010001110110"
+ "00000000110111100011010100011101001011100011001100100001110110110010010101010100101000100100001000101101011000011010100001110001101"
+ "01111011110010000100111110100011111100001000011101011101111101001111100111010101011101000110000101111011110010010111011011001110110"
+ "00110010011100010011110111100001000100111110001000101111110100011001000001110010100111001100111010010111001001101001011110100001101"
+ "01000001011101110100100100000011010011110110111101110011101101111111100111011000110011011110011001011101110010111111011100110111010"
+ "00010110001100111010000111100000100110011001011010010100010110101011000111101110001100100110100110010010010001000011011001011110000"
+ "01100000000010110101000011100001011001011111101001010101000000000101000011111010010100101001110111111000010111001101111100110111011"
+ "10101100100010001010100011111101100011000110011100000100111110011001001101100100001000000110110110001100110110101000010110100101001"
+ "11010001101101001111000111111010111001100000001011011000010001111111010001100000110011100111011111111110011101100110111110111010110"
+ "10100010100100100000000100110111101110111101101010001101010010110010110000000010101100111010100100101111001001000011000000110101100"
+ "01000101101010000100110101100111111011010101101001010000010100110101000000101000010111011001001011001010011000110110001001011111110"
+ "10010110010110111010011111001010000010000011000100111101000011011001100110111010101001010100011110111111011101011000011100100010001"
+ "11111101100101010111101100011110111111000010110111010101000100110100000011001000011000110010001011101100111000110101000101101000010"
+ "00000100101011011000110101110000100110011001110100010100000100000011110000101111100010000011010010011000100100101001111011001001101"
+ "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
+ "10100011110111110010110101001011001011000010000010001100100011011010001011011001000010001111010010011001000011110010011000011101000"
+ "11001100101000000110111011101000011101011110011111010011001111100111110000011110010010101010101111011110110000010100010101000001011"
+ "10000110001000010010010001010110000110101111100010100011000011111001001010100000001010000001000000101001110111011001011010111100101"
+ "11011011101011110100010111010011010001010100000101101001110000010101000001100010111001001010010101001100100010111111110111010010110"
+ "00100100011011100010111010111110101011111010011000000101100111101010110010010110001001100001111000110001010011000000001000111111100"
+ "11001011000000101111100010101110010101110000111111110010101010110100110111011101010110001010100001101100000010001111101100110100111"
+ "00111010001010101011000110110101001001001100000000010110001010010010111001000010101011010001010100111101010010000011010011100011001"
+ "11011000000101010100000001110001011011101001111111011001111011001110111110100010011011000010100001110010000010100110001101010100111"
+ "10110101010110111010111100001001100111000011101000010001110000001011000001101001001001111101010110010000011111110011011011000100000"
+ "11101110101001000100010111000101010010101010001101001010101111110110111101011001111010000001011111000100100110001111110110001000010"
+ "10000001111101011001101101000001101110100010010000101111000000011000110110010101000000010100010000011010001100111010100101001101000"
+ "01010010101011011111110010101011011110111010000111110111010110010110011111010001110100100010001111011000010001111100100110100000110"
+ "10110110111110110011111110101111100111101100001100100111111000101001100011101001101001101101000000001101110101101000100110000100001"
+ "01010011000100011101101100001101010101000011111011100100001100010100000011111100010101001000011011001101100101011100111001110101111"
+ "00111010100011101001101001111110100001011010001110110011000111010010100000111010101001101000111110011101111111011010000011111101000"
+ "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
+ "10000110011111111011100101001110101100010011010000111011111011001011100011111000100101000011010100100010000010110000001000111010101"
+ },
+ /* 44*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 6, -1, { 0, 0, "" }, "88888TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT", -1, 0, 23, 23, 1, 1, "",
+ "11111001110001110011100"
+ "11100111001111001110011"
+ "01011000101011110010011"
+ "01011001100100101000101"
+ "01101100001000000011001"
+ "01101111111111111110010"
+ "01111100000000000101110"
+ "01010101111111110111011"
+ "01011101000000010110001"
+ "01101101011111010111101"
+ "01101101010001010101110"
+ "01010101010101010101010"
+ "01110101010001010110110"
+ "01111101011111010111011"
+ "11011101000000010101101"
+ "01000101111111110101001"
+ "01101100000000000110110"
+ "01110111111111111110110"
+ "10010010011011000000011"
+ "10111110111110010101001"
+ "11101111000001110001001"
+ "11001110011110011100110"
+ "00111001110001110011110"
+ },
+ /* 45*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "4\000:", 3, 0, 19, 19, 1, 1, "",
"1111001000000011100"
"1100100101110000100"
"1010011010100010011"
@@ -1793,7 +2191,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1111101010111001001"
"0011111000011010100"
},
- /* 42*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "4\000:", 3, 0, 19, 19, 0, 1, "BWIPP: different encodation, one codeword shorter (see above)",
+ /* 46*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "4\000:", 3, 0, 19, 19, 0, 1, "BWIPP: different encodation, one codeword shorter (see above)",
"1100110110001101111"
"1100110000100110010"
"0010011101101111010"
@@ -1814,36 +2212,36 @@ static void test_encode(const testCtx *const p_ctx) {
"1000110111011101111"
"0011111000100011101"
},
- /* 43*/ { BARCODE_AZTEC, ESCAPE_MODE, 899, -1, -1, 4, -1, { 0, 0, "" }, "\\xA4\\xE2\\x80\\xB8\\xEF4\\xF80O\\xE0|3\\xF2\\xD8\\xA54\\x8A\\xE2kb\\x06\\\\\\x0ADe_\\xA3\\x9C\\xCF\\xDB\\xC0\\xE4", -1, 0, 27, 27, 0, 1, "BWIPP: different encodation (1 codeword longer)",
+ /* 47*/ { BARCODE_AZTEC, ESCAPE_MODE, 899, -1, -1, 4, -1, { 0, 0, "" }, "\\xA4\\xE2\\x80\\xB8\\xEF4\\xF80O\\xE0|3\\xF2\\xD8\\xA54\\x8A\\xE2kb\\x06\\\\\\x0ADe_\\xA3\\x9C\\xCF\\xDB\\xC0\\xE4", -1, 0, 27, 27, 0, 1, "BWIPP: different encodation (1 codeword longer)",
"001110010010001000001101100"
"000110001011101111010010001"
- "001000100001000111101110010"
- "010110000110110001011100000"
- "001111010111100011001111111"
- "001000001101010100000000001"
- "111011010101111000011000110"
- "101011100101000001101111110"
- "101010101111100100100000101"
- "101101101111111111100000111"
- "111110001100000001110010011"
- "101001010101111101110100010"
- "111001011101000101001010101"
- "110100111101010101100001110"
- "110110111101000101110011000"
- "101111101101111101001011101"
- "101010111100000001010000011"
- "010010100111111111100111011"
- "010111000001110110010100100"
- "011001100111011110111101100"
- "001111001000110101100100000"
- "101111000110110101010110011"
- "011001111111000001000000011"
- "111111110001011010111101111"
- "000100111101101010111011110"
+ "001011100101100100000111110"
+ "010111001011001101001111100"
+ "001100011101111011000101011"
+ "001011000000010110110001001"
+ "111011011101000111000011010"
+ "101001010101111101111111010"
+ "101000001111100100111010001"
+ "101111001111111111111101011"
+ "111101111100000001100101011"
+ "101101110101111101110101010"
+ "111000101101000101000011101"
+ "111001001101010101110000110"
+ "110111011101000101110010000"
+ "100110001101111101000101101"
+ "100000001100000001001001111"
+ "010110000111111111100111111"
+ "010010110001110110001100000"
+ "010111010100001000100001000"
+ "001000101000010010110010100"
+ "100110110001011100011111111"
+ "010111011000011000101010011"
+ "111111000101101011110110011"
+ "000011110110101011101110010"
"110001110111101001110010001"
"000000010010110110110001000"
},
- /* 44*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 899, -1, -1, 4, -1, { 0, 0, "" }, "\\xA4\\xE2\\x80\\xB8\\xEF4\\xF80O\\xE0|3\\xF2\\xD8\\xA54\\x8A\\xE2kb\\x06\\\\\\x0ADe_\\xA3\\x9C\\xCF\\xDB\\xC0\\xE4", -1, 0, 27, 27, 0, 1, "BWIPP: different encodation, 7 codewords shorter",
+ /* 48*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 899, -1, -1, 4, -1, { 0, 0, "" }, "\\xA4\\xE2\\x80\\xB8\\xEF4\\xF80O\\xE0|3\\xF2\\xD8\\xA54\\x8A\\xE2kb\\x06\\\\\\x0ADe_\\xA3\\x9C\\xCF\\xDB\\xC0\\xE4", -1, 0, 27, 27, 0, 1, "BWIPP: different encodation, 7 codewords shorter",
"001010110111011111001111101"
"000001100111001101110110110"
"001000110001110111010101111"
@@ -1872,7 +2270,7 @@ static void test_encode(const testCtx *const p_ctx) {
"110001110111111010101100111"
"000000010010111101111110011"
},
- /* 45*/ { BARCODE_AZTEC, ESCAPE_MODE, 899, -1, -1, 2, -1, { 0, 0, "" }, "*; )WF+", -1, 0, 19, 19, 1, 1, "",
+ /* 49*/ { BARCODE_AZTEC, ESCAPE_MODE, 899, -1, -1, 2, -1, { 0, 0, "" }, "*; )WF+", -1, 0, 19, 19, 1, 1, "",
"0000111010001110001"
"0000111101000011001"
"0101101110101001101"
@@ -1893,7 +2291,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1000010010001010011"
"1100110000001110010"
},
- /* 46*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 899, -1, -1, 2, -1, { 0, 0, "" }, "*; )WF+", -1, 0, 19, 19, 1, 1, "Same as above",
+ /* 50*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 899, -1, -1, 2, -1, { 0, 0, "" }, "*; )WF+", -1, 0, 19, 19, 1, 1, "Same as above",
"0000111010001110001"
"0000111101000011001"
"0101101110101001101"
@@ -1914,28 +2312,28 @@ static void test_encode(const testCtx *const p_ctx) {
"1000010010001010011"
"1100110000001110010"
},
- /* 47*/ { BARCODE_AZTEC, DATA_MODE, 899, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "\200F`\015\012", -1, 0, 19, 19, 1, 1, "",
- "0010111110010100100"
- "0011001011010001010"
- "0011000000000000110"
- "0111111111111111101"
- "0011000000000001001"
- "0001011111111101011"
- "0111010000000101110"
+ /* 51*/ { BARCODE_AZTEC, DATA_MODE, 899, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "\200F`\015\012", -1, 0, 19, 19, 0, 1, "BWIPP: different encodation, same no. of codewords",
+ "0000000110110000001"
+ "0010100011110100100"
+ "0011000000000000100"
+ "0111111111111111110"
+ "0011000000000001000"
+ "0001011111111101000"
+ "0111010000000101101"
"0111010111110101010"
"1101010100010101111"
"0101010101010101010"
- "0111010100010101111"
- "0101010111110101010"
- "0101010000000101110"
- "1111011111111101001"
- "0101000000000001011"
- "1101111111111111101"
+ "0111010100010101100"
+ "0101010111110101001"
+ "0101010000000101111"
+ "1111011111111101000"
+ "0101000000000001001"
+ "1101111111111111100"
"1100110110100110000"
"1001000011110010011"
- "1001000000111111010"
+ "1001000000111111011"
},
- /* 48*/ { BARCODE_AZTEC, FAST_MODE, 899, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "\200F`\015\012", -1, 0, 19, 19, 0, 1, "BWIPP: different encodation, 1 codeword shorter, see above",
+ /* 52*/ { BARCODE_AZTEC, FAST_MODE, 899, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "\200F`\015\012", -1, 0, 19, 19, 0, 1, "BWIPP: different encodation, 1 codeword shorter",
"0011101100000101001"
"0010101111101010000"
"0011000000000000101"
@@ -1956,7 +2354,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1001000011110010010"
"1001000000111111000"
},
- /* 49*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "ABCDEFGH\032abcdefgh\032ABCDEFGH\032~~~~~~~~\032ABCDEFGH\032;;;;;;;;;\032ABCDEFGH\032123456789\032ABCDEFGH", -1, 0, 37, 37, 1, 1, "Cycle from Upper to other modes between Byte-onlys",
+ /* 53*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "ABCDEFGH\032abcdefgh\032ABCDEFGH\032~~~~~~~~\032ABCDEFGH\032;;;;;;;;;\032ABCDEFGH\032123456789\032ABCDEFGH", -1, 0, 37, 37, 1, 1, "Cycle from Upper to other modes between Byte-onlys",
"0010100101001100111100111001110011111"
"0101111100001111100011100111001110001"
"1010101010101010101010101010101010101"
@@ -1995,46 +2393,46 @@ static void test_encode(const testCtx *const p_ctx) {
"0000101000010010000101110000111101000"
"0110010001101011101001110010100111101"
},
- /* 50*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "abcdefgh\032ABCDEFGH\032abcdefgh\032~~~~~~~~\032abcdefgh\032;;;;;;;;;\032abcdefgh\032123456789\032abcdefgh", -1, 0, 37, 37, 1, 1, "Cycle from Lower to other modes between Byte-onlys",
+ /* 54*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "abcdefgh\032ABCDEFGH\032abcdefgh\032~~~~~~~~\032abcdefgh\032;;;;;;;;;\032abcdefgh\032123456789\032abcdefgh", -1, 0, 37, 37, 0, 1, "Cycle from Lower to other modes between Byte-onlys; BWIPP: different encodation, 1 codeword longer",
"1111100001111100111100111001110010110"
"1000010100110011100011100111001111011"
"1010101010101010101010101010101010101"
- "0001100000101100100100111000111010010"
- "0011011101100111101000111010001001111"
- "1000010100100111010001111111110101000"
- "0010001111001110101111010111111101101"
- "0101011001000010100001010010011100000"
- "1010010101000000111101100101110000100"
- "0100100000011101000110001111000110011"
- "0011010000011101001000000000110101111"
- "0000101010011001000000010100010110011"
- "1010010101111111111111111110010100100"
- "1000010111111000000000001011101001010"
- "0111010010011011111111101010011000100"
- "1001011001111010000000101000110100001"
- "0010111111011010111110101110100001101"
- "1101010111011010100010101110101111011"
+ "0001101000001011000101001110001110010"
+ "0011010111011001111100001110100010111"
+ "1000011101101001110101010100001001000"
+ "0010010111111110101111010101011010101"
+ "0101000010001100100011111100111101000"
+ "1010010010010010111100010010100101100"
+ "0100101000001110110011001011111000011"
+ "0011010100010101011001010011000000111"
+ "0000110100011001000000010100101010011"
+ "1010010001011111111111111101011001100"
+ "1000011111111000000000001000000010010"
+ "0111011110011011111111101011011000100"
+ "1001010101001010000000101010010101001"
+ "0010111110101010111110101111111100101"
+ "1101011001011010100010101110100100011"
"1010101010101010101010101010101010101"
- "1000011011111010100010101111111101000"
- "1011111100111010111110101010100101101"
- "0001010010101010000000101110000010010"
- "0111000011001011111111101011011000101"
- "0000001111111000000000001100010110001"
- "1110100011001111111111111110011100100"
- "1100001000100110010110110000100101000"
- "1111110101110011101000000110011101110"
- "0001110011101001110010001101010011001"
- "0011111111101001111001101100101111110"
- "1000010111101010100011111110010111000"
- "0010000001010000101010001011101011101"
- "1101000100100011010011100011111101000"
- "0110111111111001111001110011100110100"
- "0100100101100111000111001110011110001"
+ "1000010101101010100010101000101110000"
+ "1011100111111010111110101011000111101"
+ "0001001011011010000000101010110100010"
+ "0111000101001011111111101100101101101"
+ "0000001110111000000000001011001110001"
+ "1110110100101111111111111111111011100"
+ "1100010011100001110100100011001010000"
+ "1111111000100010101111001010100001110"
+ "0001110001010010110011011111100010001"
+ "0011100111111001101101011110001111110"
+ "1000100000100101010100101001111110000"
+ "0010100101000010011000101110011001101"
+ "1101010010001101010110001110110010000"
+ "0110110111011101111011101110111011100"
+ "0100100010101010100101010101010110001"
"1010101010101010101010101010101010101"
"1001001001000110100111000111001010011"
"1111100001010000101010001011100001101"
},
- /* 51*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "~~~~~~~~\032ABCDEFGH\032~~~~~~~~\032abcdefgh\032~~~~~~~~\032;;;;;;;;;\032~~~~~~~~\032123456789\032~~~~~~~~", -1, 0, 37, 37, 1, 1, "Ditto Mixed",
+ /* 55*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "~~~~~~~~\032ABCDEFGH\032~~~~~~~~\032abcdefgh\032~~~~~~~~\032;;;;;;;;;\032~~~~~~~~\032123456789\032~~~~~~~~", -1, 0, 37, 37, 1, 1, "Ditto Mixed",
"1111111000011101001010010000101000100"
"1000100101001110000111010110001001000"
"1010101010101010101010101010101010101"
@@ -2073,7 +2471,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1100100100011010110100011100101001011"
"1010000101000010011000101110000111101"
},
- /* 52*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, ";;;;;;;;;\032ABCDEFGH\032;;;;;;;;;\032abcdefgh\032;;;;;;;;;\032~~~~~~~~\032;;;;;;;;;\032123456789\032;;;;;;;;;", -1, 0, 37, 37, 1, 1, "Ditto Punct",
+ /* 56*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, ";;;;;;;;;\032ABCDEFGH\032;;;;;;;;;\032abcdefgh\032;;;;;;;;;\032~~~~~~~~\032;;;;;;;;;\032123456789\032;;;;;;;;;", -1, 0, 37, 37, 1, 1, "Ditto Punct",
"1110111010110001001100111100001111111"
"1000001001000010100000010010100101011"
"1010101010101010101010101010101010101"
@@ -2112,7 +2510,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1000001100001010000010010001011100000"
"1010101000100100011101011100011100101"
},
- /* 53*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "123456789\032ABCDEFGH\032123456789\032abcdefgh\032123456789\032~~~~~~~~\032123456789\032;;;;;;;;;\032123456789", -1, 0, 37, 37, 1, 1, "Ditto Digit",
+ /* 57*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "123456789\032ABCDEFGH\032123456789\032abcdefgh\032123456789\032~~~~~~~~\032123456789\032;;;;;;;;;\032123456789", -1, 0, 37, 37, 1, 1, "Ditto Digit",
"1111011001010011101001110101100010101"
"1101001111000011100100010010000101000"
"1010101010101010101010101010101010101"
@@ -2151,36 +2549,36 @@ static void test_encode(const testCtx *const p_ctx) {
"0000101000010010000101110000111100010"
"0110010001101011101001110010100110111"
},
- /* 54*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, " ABCD EFGH abcd efgh ~~~~ ~~~~~ ;;;; ;;; 12345 67890", -1, 0, 27, 27, 0, 1, "Spaces; BWIPP different encodation, LL before not after space, same no. of codewords",
+ /* 58*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, " ABCD EFGH abcd efgh ~~~~ ~~~~~ ;;;; ;;; 12345 67890", -1, 0, 27, 27, 0, 1, "Spaces; BWIPP different encodation, L/L & M/L before not after space, same no. of codewords",
"001100111001100000111001110"
"000011100111111001100111001"
- "101101101010100001101001010"
- "000101101001110111100011111"
- "101101010100000001000110110"
- "001111010111111010110101100"
- "011111110001000000001111100"
- "101101111111111111111000010"
- "010001010000000000011101011"
- "000000010111111111010000101"
- "001010010100000001010011101"
- "100011110101111101010111010"
- "100100110101000101011010010"
+ "101100011101001111111010110"
+ "000100111100111011011010111"
+ "101100011110101011011101110"
+ "001101011100111011000010000"
+ "011110110001000000001110100"
+ "101111111111111111111000110"
+ "010000010000000000011010011"
+ "000001010111111111010001001"
+ "001001010100000001010101101"
+ "100010110101111101010011110"
+ "100110110101000101011111110"
"010101010101010101010101010"
- "000101110101000101011101011"
- "011011110101111101010010101"
- "000010110100000001010100001"
- "110011110111111111010001111"
- "001000010000000000011111100"
- "011110011111111111111000100"
- "110001000001101010000100010"
- "010001001000110010100111111"
- "000111001111101101111100111"
+ "000110110101000101011010111"
+ "011010110101111101010110101"
+ "000000110100000001010010001"
+ "110000110111111111010001111"
+ "001001010000000000011011101"
+ "011101011111111111111010111"
+ "110001000001101010000000010"
+ "010001111101110000011101100"
+ "000100000111101101001000101"
"001001011011110110100010100"
"100100010000001010010100110"
"100110010010010110001001000"
"000110000010100000010101101"
},
- /* 55*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, " ABCD EFGH abcd efgh ~~~~ ~~~~~ ;;;; ;;; 12345 67890", -1, 0, 27, 27, 0, 1, "BWIPP different encodation, 1 codeword less",
+ /* 59*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, " ABCD EFGH abcd efgh ~~~~ ~~~~~ ;;;; ;;; 12345 67890", -1, 0, 27, 27, 0, 1, "BWIPP different encodation, 1 codeword less",
"001100111001100000111001110"
"000011100111111001100111001"
"101100000000101111101010110"
@@ -2209,7 +2607,7 @@ static void test_encode(const testCtx *const p_ctx) {
"100110010010010110001001000"
"000110000010100000010101101"
},
- /* 56*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, ";;;; ;;;; 1234", -1, 0, 23, 23, 0, 1, "Spaces; BWIPP different encodation, same no. of codewords, however BWIPP wins by 1-bit due to less bit-stuffing",
+ /* 60*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, ";;;; ;;;; 1234", -1, 0, 23, 23, 0, 1, "Spaces; BWIPP different encodation, same no. of codewords, however BWIPP wins by 1 bit due to less bit-stuffing",
"11010110011001000111101"
"10100111111110100011101"
"11100000101010100000100"
@@ -2234,7 +2632,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11111110011110011110100"
"11011001110001110111101"
},
- /* 57*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, ";;;; ;;;; 1234", -1, 0, 23, 23, 0, 1, "Same as above",
+ /* 61*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, ";;;; ;;;; 1234", -1, 0, 23, 23, 0, 1, "Same as above",
"11010110011001000111101"
"10100111111110100011101"
"11100000101010100000100"
@@ -2259,32 +2657,32 @@ static void test_encode(const testCtx *const p_ctx) {
"11111110011110011110100"
"11011001110001110111101"
},
- /* 58*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "ABC\015D\015~~~~\015~~~~~\015;;;;\015;;;\015~~~~\015\012", -1, 0, 23, 23, 0, 1, "CRs; BWIPP different encodation, same no. of codewords",
- "00111111111010011101000"
- "01101000111101110011100"
- "00011101011010111100111"
- "00011011110101000011001"
+ /* 62*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "ABC\015D\015~~~~\015~~~~~\015;;;;\015;;;\015~~~~\015\012", -1, 0, 23, 23, 0, 1, "CRs; BWIPP different encodation, same no. of codewords",
+ "00101111100010011101000"
+ "01110111100101110011100"
+ "00011111001000110100011"
+ "00010111100101010000001"
"11101100001000000010101"
- "00101111111111111110010"
- "10110100000000000100110"
+ "00101111111111111110110"
+ "10110100000000000101010"
"00011101111111110110111"
- "00011101000000010111101"
- "00100101011111010110101"
- "00100101010001010111010"
+ "00011101000000010110001"
+ "00100101011111010111101"
+ "00100101010001010110010"
"01010101010101010101010"
- "01011101010001010111110"
- "01110101011111010101011"
- "00001101000000010110111"
- "10101101111111110110101"
- "11110100000000000110111"
- "11110111111111111111000"
- "01100011000010000001110"
- "01100000111111111010111"
- "11101110000000111010001"
+ "01111101010001010111110"
+ "01110101011111010100111"
+ "00001101000000010110011"
+ "10001101111111110111001"
+ "11100100000000000110111"
+ "11110111111111111110100"
+ "01110011000010000000010"
+ "01010111100110011100011"
+ "11001000100011101110101"
"10011100110110111001101"
"01110011100011100111010"
},
- /* 59*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "ABC\015D\015~~~~\015~~~~~\015;;;;\015;;;\015~~~~\015\012", -1, 0, 23, 23, 0, 1, "Same as above",
+ /* 63*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "ABC\015D\015~~~~\015~~~~~\015;;;;\015;;;\015~~~~\015\012", -1, 0, 23, 23, 0, 1, "Same as above",
"00101111100010011101000"
"01110111100101110011100"
"00010001110001100111111"
@@ -2309,7 +2707,24 @@ static void test_encode(const testCtx *const p_ctx) {
"10011100110110111001101"
"01110011100011100111010"
},
- /* 60*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\012\015", -1, 0, 15, 15, 1, 1, "CR/CRLF",
+ /* 64*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\012\015", -1, 0, 15, 15, 0, 1, "CR/CRLF; BWIPP: different encodation, same no. of codewords, see below",
+ "000000111000100"
+ "110101000001110"
+ "101100000010100"
+ "111111111111101"
+ "111100000001110"
+ "101101111101111"
+ "000101000101100"
+ "010101010101100"
+ "000101000101010"
+ "001101111101111"
+ "011100000001111"
+ "110111111111111"
+ "110000101000010"
+ "101110111000001"
+ "100011010111000"
+ },
+ /* 65*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\012\015", -1, 0, 15, 15, 1, 1, "Uses P/Ss instead of M/L P/L latch",
"001110111101100"
"001100100011101"
"001100000010111"
@@ -2326,24 +2741,7 @@ static void test_encode(const testCtx *const p_ctx) {
"011001000111101"
"101010100010101"
},
- /* 61*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\012\015", -1, 0, 15, 15, 1, 1, "Same as above",
- "001110111101100"
- "001100100011101"
- "001100000010111"
- "011111111111110"
- "001100000001101"
- "011101111101110"
- "000101000101101"
- "000101010101101"
- "000101000101001"
- "011101111101101"
- "001100000001100"
- "010111111111100"
- "110000101000000"
- "011001000111101"
- "101010100010101"
- },
- /* 62*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\015\012\015\015\012", -1, 0, 15, 15, 0, 1, "CR/CRLF; BWIPP: different encodation, same no. of codewords",
+ /* 66*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\015\012\015\015\012", -1, 0, 15, 15, 0, 1, "CR/CRLF; BWIPP: different encodation, same no. of codewords",
"000000101100011"
"111100111011110"
"101100000100111"
@@ -2360,7 +2758,7 @@ static void test_encode(const testCtx *const p_ctx) {
"000101100111000"
"101110011111011"
},
- /* 63*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\015\012\015\015\012", -1, 0, 15, 15, 1, 1, "Same as BWIPP",
+ /* 67*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\015\012\015\015\012", -1, 0, 15, 15, 1, 1, "Same as BWIPP",
"001110010000101"
"110111101011100"
"101100000100100"
@@ -2377,7 +2775,7 @@ static void test_encode(const testCtx *const p_ctx) {
"000010001000101"
"101110000101001"
},
- /* 64*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", .", -1, 0, 15, 15, 1, 1, "Spaces/dots/commas: uses DL",
+ /* 68*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", .", -1, 0, 15, 15, 1, 1, "Spaces/dots/commas: uses D/L",
"000001001101000"
"110000011111000"
"111100000010110"
@@ -2394,7 +2792,7 @@ static void test_encode(const testCtx *const p_ctx) {
"010001111001000"
"100110100000110"
},
- /* 65*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", .", -1, 0, 15, 15, 0, 1, "Spaces/dots/commas: uses PSs, which is 3-bits more; BWIPP: see above",
+ /* 69*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", .", -1, 0, 15, 15, 0, 1, "Spaces/dots/commas: uses P/Ss, which is 3 bits more; BWIPP: see above",
"000110011011010"
"000101111100100"
"001100000010111"
@@ -2411,7 +2809,24 @@ static void test_encode(const testCtx *const p_ctx) {
"001110101111111"
"010001001101111"
},
- /* 66*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", . ", -1, 0, 15, 15, 1, 1, "Spaces/dots/commas: uses 2 PSs, which although 1-bit less than using DL, ends up 1-bit more after bit-stuffing",
+ /* 70*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", . ", -1, 0, 15, 15, 0, 1, "Spaces/dots/commas: uses M/L P/L; BWIPP 2 P/Ss, 1 bit more but only due to bit-stuffing",
+ "001111111100011"
+ "110000111101011"
+ "101100000010101"
+ "111111111111100"
+ "111100000001110"
+ "101101111101101"
+ "000101000101110"
+ "100101010101100"
+ "000101000101000"
+ "001101111101110"
+ "111100000001101"
+ "110111111111101"
+ "100000101000000"
+ "010100011111001"
+ "001010001110010"
+ },
+ /* 71*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", . ", -1, 0, 15, 15, 1, 1, "Uses 2 P/Ss, see above",
"001011111110101"
"001100011001011"
"001100000010110"
@@ -2428,58 +2843,1501 @@ static void test_encode(const testCtx *const p_ctx) {
"101111111111111"
"110111100000011"
},
- /* 67*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", . ", -1, 0, 15, 15, 1, 1, "Same as above",
- "001011111110101"
- "001100011001011"
- "001100000010110"
- "011111111111110"
+ /* 72*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", . , ", -1, 0, 15, 15, 0, 1, "Spaces/dots/commas",
+ "001111110111101"
+ "111100000011101"
+ "101100000100111"
+ "111111111111101"
+ "110100000001000"
+ "100101111101100"
+ "001101000101011"
+ "100101010101110"
+ "000101000101011"
+ "000101111101011"
+ "110100000001001"
+ "000111111111100"
+ "100011101110001"
+ "111100000110001"
+ "011011011100111"
+ },
+ /* 73*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", . , ", -1, 0, 15, 15, 1, 1, "Same as above",
+ "001111110111101"
+ "111100000011101"
+ "101100000100111"
+ "111111111111101"
+ "110100000001000"
+ "100101111101100"
+ "001101000101011"
+ "100101010101110"
+ "000101000101011"
+ "000101111101011"
+ "110100000001001"
+ "000111111111100"
+ "100011101110001"
+ "111100000110001"
+ "011011011100111"
+ },
+ /* 74*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡", -1, 0, 37, 37, 0, 3, "62 bytes; BWIPP: uses 1 B/S(62) instead of 2 B/S(31)s (1 bit longer) TODO: change BWIPP",
+ "1110010001000100011000100010001000110"
+ "1100110011001100110001100110011001010"
+ "1010101010101010101010101010101010101"
+ "1100001000100010000100010001000100000"
+ "1011111001100110011100110011001100110"
+ "1101100110010110010110001011001110011"
+ "1111100100001100101100010011010011100"
+ "0101111011110100000110001000100100000"
+ "0011101001000011101011110110010000110"
+ "0001100000001011100100010000001010011"
+ "1110100101111110001001000010110011100"
+ "0100011000111001000000010100010000000"
+ "0010001011111111111111111110011000110"
+ "0001100001111000000000001010011110011"
+ "1110100111001011111111101011001011100"
+ "0100011011111010000000101000101000000"
+ "0010001000111010111110101000011100110"
+ "0001100001001010100010101011000010011"
+ "1010101010101010101010101010101010101"
+ "1100100011001010100010101000101111000"
+ "0110011100011010111110101001101000100"
+ "0000001101001010000000101010110000010"
+ "0011100100101011111111101110111110111"
+ "1100100010001000000000001100110111000"
+ "0110011011001111111111111101000100100"
+ "0000011010000111010011100001110000010"
+ "0011110010000010001111001111111110111"
+ "1100101100101111100110011011001111000"
+ "0110010101110101001001001110101000100"
+ "0000011010011010100000111110011100010"
+ "0011101101001011001010100011010010111"
+ "1100100101100000110101000001000111000"
+ "0110011001100110011100110011001100100"
+ "0000010001000100010000100010001000010"
+ "1010101010101010101010101010101010101"
+ "0101001100110011000110011001100110011"
+ "0110001000100010001100010001000100100"
+ },
+ /* 75*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡", -1, 0, 37, 37, 0, 3, "BWIPP: see above",
+ "1110010001000100011000100010001000110"
+ "1100110011001100110001100110011001010"
+ "1010101010101010101010101010101010101"
+ "1100001000100010000100010001000100000"
+ "1011111001100110011100110011001100110"
+ "1101100110010110010110001011001110011"
+ "1111100100001100101100010011010011100"
+ "0101111011110100000110001000100100000"
+ "0011101001000011101011110110010000110"
+ "0001100000001011100100010000001010011"
+ "1110100101111110001001000010110011100"
+ "0100011000111001000000010100010000000"
+ "0010001011111111111111111110011000110"
+ "0001100001111000000000001010011110011"
+ "1110100111001011111111101011001011100"
+ "0100011011111010000000101000101000000"
+ "0010001000111010111110101000011100110"
+ "0001100001001010100010101011000010011"
+ "1010101010101010101010101010101010101"
+ "1100100011001010100010101000101111000"
+ "0110011100011010111110101001101000100"
+ "0000001101001010000000101010110000010"
+ "0011100100101011111111101110111110111"
+ "1100100010001000000000001100110111000"
+ "0110011011001111111111111101000100100"
+ "0000011010000111010011100001110000010"
+ "0011110010000010001111001111111110111"
+ "1100101100101111100110011011001111000"
+ "0110010101110101001001001110101000100"
+ "0000011010011010100000111110011100010"
+ "0011101101001011001010100011010010111"
+ "1100100101100000110101000001000111000"
+ "0110011001100110011100110011001100100"
+ "0000010001000100010000100010001000010"
+ "1010101010101010101010101010101010101"
+ "0101001100110011000110011001100110011"
+ "0110001000100010001100010001000100100"
+ },
+ /* 76*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡", -1, 0, 37, 37, 1, 3, "63 bytes",
+ "1111001100110011001110011001100110101"
+ "1100100010001000100001000100010001000"
+ "1010101010101010101010101010101010101"
+ "1001010011001100110001100110011001001"
+ "0010001000100010001100010001000100110"
+ "0000110101111001110111010001011101000"
+ "0011000111010111001110001100101010101"
+ "0001001110000011000001011010000100001"
+ "0110010111011111011001101011111001110"
+ "1000110000101100010110111100111101000"
+ "0011000001110000111001110001110010101"
+ "0001001100111001000000010111100100001"
+ "1010010000111111111111111111001101110"
+ "1000110100111000000000001001010101000"
+ "0011000100001011111111101011010110101"
+ "0101001010101010000000101010011100001"
+ "1010010111101010111110101000110001110"
+ "1000110001001010100010101001000101000"
+ "1010101010101010101010101010101010101"
+ "0001000000111010100010101101001110001"
+ "0111001101111010111110101011101000101"
+ "1000010011111010000000101111111001010"
+ "1010110010101011111111101010010001100"
+ "0001000111001000000000001011111110001"
+ "0111001010001111111111111100001000101"
+ "1000010101100000110001110011110101010"
+ "1010110001000110001110000010011101100"
+ "0001000010100100010100111001110010001"
+ "0111001100111011011111000000001100101"
+ "1000011010000111110010010101101001010"
+ "1010101110001000011000001110101001100"
+ "0001010000010101110110001011111110001"
+ "0110010001000100011000100010001000101"
+ "1001001100110011000110011001100101010"
+ "1010101010101010101010101010101010101"
+ "0001000100010001000010001000100010000"
+ "1010110011001100111001100110011001101"
+ },
+ /* 77*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡", -1, 0, 37, 37, 1, 3, "63 bytes",
+ "1111001100110011001110011001100110101"
+ "1100100010001000100001000100010001000"
+ "1010101010101010101010101010101010101"
+ "1001010011001100110001100110011001001"
+ "0010001000100010001100010001000100110"
+ "0000110101111001110111010001011101000"
+ "0011000111010111001110001100101010101"
+ "0001001110000011000001011010000100001"
+ "0110010111011111011001101011111001110"
+ "1000110000101100010110111100111101000"
+ "0011000001110000111001110001110010101"
+ "0001001100111001000000010111100100001"
+ "1010010000111111111111111111001101110"
+ "1000110100111000000000001001010101000"
+ "0011000100001011111111101011010110101"
+ "0101001010101010000000101010011100001"
+ "1010010111101010111110101000110001110"
+ "1000110001001010100010101001000101000"
+ "1010101010101010101010101010101010101"
+ "0001000000111010100010101101001110001"
+ "0111001101111010111110101011101000101"
+ "1000010011111010000000101111111001010"
+ "1010110010101011111111101010010001100"
+ "0001000111001000000000001011111110001"
+ "0111001010001111111111111100001000101"
+ "1000010101100000110001110011110101010"
+ "1010110001000110001110000010011101100"
+ "0001000010100100010100111001110010001"
+ "0111001100111011011111000000001100101"
+ "1000011010000111110010010101101001010"
+ "1010101110001000011000001110101001100"
+ "0001010000010101110110001011111110001"
+ "0110010001000100011000100010001000101"
+ "1001001100110011000110011001100101010"
+ "1010101010101010101010101010101010101"
+ "0001000100010001000010001000100010000"
+ "1010110011001100111001100110011001101"
+ },
+ /* 78*/ { BARCODE_AZTEC, UNICODE_MODE | ESCAPE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0E\\x0E", -1, 0, 37, 37, 0, 3, "BWIPP: different encodation, 1 bit worse (does B/S(31) U B/S(31) B/S1(1) instead of single B/S(64))",
+ "1110110000001100001001100000011000100"
+ "1101010010010100100010100100101001000"
+ "1010101010101010101010101010101010101"
+ "1000001100000011000000011000000110010"
+ "0010010100100101001100101001001010101"
+ "0000100111001100010011011011000000011"
+ "0010000000101011101001110011010110100"
+ "0000001000011101000101010010101000000"
+ "0111100100111101111101111111110000110"
+ "1001000011101110110010010111100010000"
+ "0010111110111000111101001000111101100"
+ "0100010110011001000000010101001111010"
+ "0010001000011111111111111101110100101"
+ "0000100011001000000000001001001100011"
+ "1110000101011011111111101000010010100"
+ "1000001000011010000000101000011100000"
+ "0111100000101010111110101000000000110"
+ "0001000001111010100010101100101010000"
+ "1010101010101010101010101010101010101"
+ "0000111011111010100010101001110101000"
+ "0110010101001010111110101110110111110"
+ "0000001110001010000000101100001000001"
+ "0010100100011011111111101000000100111"
+ "1100000101111000000000001111111010000"
+ "1010001001001111111111111100010000100"
+ "0101100100100101100001100000011100010"
+ "0011000000001100001111000011101110100"
+ "0000111110010110110100001010010101000"
+ "0110010101111100011001101100000011110"
+ "0000000000111001000000111101100100001"
+ "0010101010101100111010001010010100111"
+ "1100001110010110000011101100001010000"
+ "1010101001001010011001010010010100100"
+ "0100110000001100000001100000011000010"
+ "1010101010101010101010101010101010101"
+ "0001001010010010100010010100100101000"
+ "0010001100000011001000011000000110100"
+ },
+ /* 79*/ { BARCODE_AZTEC, UNICODE_MODE | ESCAPE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0EA\\x0E\\x0E", -1, 0, 41, 41, 0, 3, "Degenerate encodation FAST_MODE; BWIPP see above",
+ "11001011110010010011100011000011110011001"
+ "11010001100011000011011001001001100001100"
+ "10001001001100011000101111001001001110000"
+ "00110100001111001001000110001100001101100"
+ "10101010101010101010101010101010101010101"
+ "01100111110011111111010100010000011000011"
+ "00001000101111100101111110011001011110111"
+ "00010001101010011100010001110100001001110"
+ "11011101101000110110101111001100010010010"
+ "10110110010101111000000101001111110100000"
+ "00111110011000110111110010011100101111001"
+ "01000100010100111000001100100111110000011"
+ "01001001101101111101101011110000000010100"
+ "11100010110111100101000001011100001001100"
+ "11001000110101111111111111110110100011110"
+ "00010000011100100000000000100100100100100"
+ "00111110100000101111111110111111111110001"
+ "10000101011001101000000010110010111100011"
+ "00001001111111101011111010111101000111111"
+ "01100010100011101010001010100011010001001"
+ "10101010101010101010101010101010101010101"
+ "11110010000001101010001010101110000000000"
+ "00111111100000101011111010110011001110100"
+ "00100111111010101000000010111010101000011"
+ "10001001101000101111111110100010110010010"
+ "11010000101011100000000000111000110101100"
+ "11001100110010111111111111111011110011101"
+ "10000001011000010000011111000010110001000"
+ "00111010011010000011101010000000101111000"
+ "01100111101110011101000010100001101100011"
+ "00001001101111001001111111101001101010111"
+ "00010001000000100101011101100000011001110"
+ "11011100001010111011101101100101100010010"
+ "10110111010001101010000110001111110100000"
+ "00111100100100111100100110001100101111001"
+ "01000110000110001100010010011110000000011"
+ "10101010101010101010101010101010101010101"
+ "01000011000110010010001111000011000100100"
+ "11011001001111000011100011001001001111100"
+ "10000011000110010010001111000011000101010"
+ "10011001001111000011100011001001001111100"
+ },
+ /* 80*/ { BARCODE_AZTEC, UNICODE_MODE | ESCAPE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\\x0EAB\\x0EA", -1, 0, 15, 15, 1, 3, "",
+ "000110100010010"
+ "111010010010111"
+ "111100000110100"
+ "101111111111100"
"001100000001111"
- "101101111101110"
- "000101000101110"
- "000101010101110"
- "000101000101010"
- "011101111101111"
- "001100000001110"
- "110111111111100"
- "110000101000010"
+ "101101111101010"
+ "001101000101100"
+ "000101010101001"
+ "010101000101000"
+ "111101111101111"
+ "001100000001111"
+ "100111111111111"
+ "000011000110011"
+ "000010011000100"
+ "011000001001100"
+ },
+ /* 81*/ { BARCODE_AZTEC, UNICODE_MODE | ESCAPE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\\x0EAB\\x0EA", -1, 0, 15, 15, 0, 3, "BWIPP: as above",
+ "001000001001001"
+ "111011010000100"
+ "111100001000110"
"101111111111111"
- "110111100000011"
- },
- /* 68*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", . , ", -1, 0, 15, 15, 0, 1, "Spaces/dots/commas",
- "001111110111101"
- "111100000011101"
- "101100000100111"
- "111111111111101"
- "110100000001000"
- "100101111101100"
- "001101000101011"
- "100101010101110"
- "000101000101011"
- "000101111101011"
- "110100000001001"
+ "000100000001001"
+ "000101111101010"
+ "100101000101111"
+ "001101010101100"
+ "011101000101111"
+ "111101111101011"
+ "000100000001100"
"000111111111100"
- "100011101110001"
- "111100000110001"
- "011011011100111"
+ "100001010010010"
+ "011110000110011"
+ "001110010010001"
},
- /* 69*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, ", . , ", -1, 0, 15, 15, 1, 1, "Same as above",
- "001111110111101"
- "111100000011101"
- "101100000100111"
- "111111111111101"
- "110100000001000"
- "100101111101100"
- "001101000101011"
- "100101010101110"
- "000101000101011"
- "000101111101011"
- "110100000001001"
+ /* 82*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "A. b.", -1, 0, 15, 15, 0, 3, "AZHighLevelEncoderTest::HighLevelEncode #1; BWIPP: different encodation, same no. of codewords",
+ "000101010001101"
+ "001100100010011"
+ "011100000100100"
+ "001111111111110"
+ "001100000001110"
+ "000101111101000"
+ "011101000101001"
+ "000101010101000"
+ "110101000101111"
+ "111101111101011"
+ "100100000001111"
+ "000111111111111"
+ "000011011110001"
+ "110011001110010"
+ "111110100000101"
+ },
+ /* 83*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "A. b.", -1, 0, 15, 15, 0, 3, "Same as above",
+ "000101010001101"
+ "001100100010011"
+ "011100000100100"
+ "001111111111110"
+ "001100000001110"
+ "000101111101000"
+ "011101000101001"
+ "000101010101000"
+ "110101000101111"
+ "111101111101011"
+ "100100000001111"
+ "000111111111111"
+ "000011011110001"
+ "110011001110010"
+ "111110100000101"
+ },
+ /* 84*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, "Lorem ipsum.", -1, 0, 19, 19, 1, 3, "AZHighLevelEncoderTest::HighLevelEncode #2",
+ "0111111010110010001"
+ "1010000001000111010"
+ "1100011001000110111"
+ "1111110001000011111"
+ "0011110100101010010"
+ "1001111111111111010"
+ "0001110000000111101"
+ "0101010111110111001"
+ "0011010100010101111"
+ "1100010101010101101"
+ "0010010100010100010"
+ "1111110111110111010"
+ "0011110000000110011"
+ "1110011111111111010"
+ "1011000011111000111"
+ "0001101110010000010"
+ "0011000101001100011"
+ "0000011001010111011"
+ "1111010011011110111"
+ },
+ /* 85*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, "Lorem ipsum.", -1, 0, 19, 19, 1, 3, "Same as above",
+ "0111111010110010001"
+ "1010000001000111010"
+ "1100011001000110111"
+ "1111110001000011111"
+ "0011110100101010010"
+ "1001111111111111010"
+ "0001110000000111101"
+ "0101010111110111001"
+ "0011010100010101111"
+ "1100010101010101101"
+ "0010010100010100010"
+ "1111110111110111010"
+ "0011110000000110011"
+ "1110011111111111010"
+ "1011000011111000111"
+ "0001101110010000010"
+ "0011000101001100011"
+ "0000011001010111011"
+ "1111010011011110111"
+ },
+ /* 86*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, "Lo. Test 123.", -1, 0, 19, 19, 1, 3, "AZHighLevelEncoderTest::HighLevelEncode #3",
+ "0110101001101101100"
+ "1001010101000000011"
+ "1101100100010100000"
+ "1101100110010101100"
+ "0011110100110011110"
+ "1001111111111111001"
+ "0000010000000100001"
+ "0010110111110110010"
+ "0100110100010110000"
+ "0000010101010101000"
+ "0011010100010100111"
+ "0110010111110100011"
+ "0100010000000100001"
+ "1111011111111110101"
+ "1100001111100001111"
+ "0010100101001110101"
+ "1010010111101000011"
+ "0010001111100010001"
+ "1101110001100101100"
+ },
+ /* 87*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, "Lo. Test 123.", -1, 0, 19, 19, 1, 3, "Same as above",
+ "0110101001101101100"
+ "1001010101000000011"
+ "1101100100010100000"
+ "1101100110010101100"
+ "0011110100110011110"
+ "1001111111111111001"
+ "0000010000000100001"
+ "0010110111110110010"
+ "0100110100010110000"
+ "0000010101010101000"
+ "0011010100010100111"
+ "0110010111110100011"
+ "0100010000000100001"
+ "1111011111111110101"
+ "1100001111100001111"
+ "0010100101001110101"
+ "1010010111101000011"
+ "0010001111100010001"
+ "1101110001100101100"
+ },
+ /* 88*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "Lo...x", -1, 0, 15, 15, 1, 3, "AZHighLevelEncoderTest::HighLevelEncode #4",
+ "000111110110000"
+ "010101111011011"
+ "101100000110111"
+ "111111111111110"
+ "111100000001111"
+ "001101111101010"
+ "101101000101110"
+ "000101010101001"
+ "010101000101010"
+ "111101111101110"
+ "101100000001101"
+ "110111111111101"
+ "010011000110000"
+ "111110101011010"
+ "101011110101001"
+ },
+ /* 89*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "Lo...x", -1, 0, 15, 15, 1, 3, "Same as above",
+ "000111110110000"
+ "010101111011011"
+ "101100000110111"
+ "111111111111110"
+ "111100000001111"
+ "001101111101010"
+ "101101000101110"
+ "000101010101001"
+ "010101000101010"
+ "111101111101110"
+ "101100000001101"
+ "110111111111101"
+ "010011000110000"
+ "111110101011010"
+ "101011110101001"
+ },
+ /* 90*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, ". x://abc/.", -1, 0, 19, 19, 0, 3, "AZHighLevelEncoderTest::HighLevelEncode #5; BWIPP: different encodation, same no. of codewords",
+ "0001000110110110010"
+ "0010101001100101000"
+ "0110100110000001111"
+ "0001110001100100110"
+ "0100110100110011100"
+ "1100111111111110011"
+ "1110110000000110011"
+ "0001110111110100111"
+ "1101110100010110010"
+ "0010010101010110000"
+ "1000010100010110000"
+ "0000110111110101110"
+ "0001010000000111111"
+ "1001011111111110000"
+ "1000001100100000110"
+ "1011001010110000010"
+ "0001101100000001000"
+ "0000000000001010100"
+ "0110001100100100111"
+ },
+ /* 91*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, ". x://abc/.", -1, 0, 19, 19, 0, 3, "BWIPP: different encodation, 2 codewords shorter (see above)",
+ "0010111000101000011"
+ "0010011010001010111"
+ "0110110111000101101"
+ "0011100111011001001"
+ "0110110100111010000"
+ "1110111111111110111"
+ "1111110000000111111"
+ "0010010111110101010"
+ "1111110100010101001"
+ "0010010101010110000"
+ "1100010100010101100"
+ "1111110111110110000"
+ "0111110000000111101"
+ "1111011111111111101"
+ "1101001101000000010"
+ "0110100001111001000"
+ "0110101101110000000"
+ "1001101110000001000"
+ "0110001111100100110"
+ },
+ /* 92*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "ABCdEFG", -1, 0, 15, 15, 1, 3, "AZHighLevelEncoderTest::HighLevelEncode #6, uses B/S for 'd' (saves 2 bits)",
+ "000011001010101"
+ "001010101101011"
+ "011100000110100"
+ "001111111111111"
+ "001100000001110"
+ "111101111101000"
+ "001101000101101"
+ "100101010101011"
+ "010101000101011"
+ "111101111101100"
+ "111100000001100"
+ "000111111111101"
+ "000011000110001"
+ "010001001000101"
+ "110100101110111"
+ },
+ /* 93*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "ABCdEFG", -1, 0, 15, 15, 0, 3, "AZHighLevelEncoderTest::HighLevelEncode #6, uses L/L; BWIPP: see above",
+ "001100111100100"
+ "001110101011101"
+ "011100001000111"
+ "001111111111100"
+ "000100000001011"
+ "110101111101010"
+ "000101000101100"
+ "101101010101101"
+ "011101000101111"
+ "111101111101000"
+ "000100000001100"
"000111111111100"
- "100011101110001"
- "111100000110001"
- "011011011100111"
+ "100001010010011"
+ "110110100100011"
+ "111010010111011"
},
- /* 70*/ { BARCODE_AZTEC, DATA_MODE, 3, -1, -1, 1, -1, { 0, 0, "" }, "\101\300", -1, 0, 15, 15, 1, 899, "AÀ",
+ /* 94*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, " \001\002\003\004\005\006\007\010\011\012\013\014\015\033\034\035\036\037@\\^_`|~\177", -1, 0, 19, 19, 0, 3, "All Mixed; BWIPP: different encodation (switches to M/L immediately), same no. of codewords",
+ "0000101001100110001"
+ "0011110101111101110"
+ "1110001010010101101"
+ "1111100010101001011"
+ "0111110101011010100"
+ "0010111111111111110"
+ "0100010000000110110"
+ "0001110111110110101"
+ "0010110100010100110"
+ "1100010101010101100"
+ "0011110100010101010"
+ "1001010111110101000"
+ "0010010000000110001"
+ "0101011111111110011"
+ "0101001101101001011"
+ "0000101000101111000"
+ "1110001001100000111"
+ "0111000111001100110"
+ "0010001000011010110"
+ },
+ /* 95*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, " \001\002\003\004\005\006\007\010\011\012\013\014\015\033\034\035\036\037@\\^_`|~\177", -1, 0, 19, 19, 0, 3, "Same as above; BWIPP see above",
+ "0000101001100110001"
+ "0011110101111101110"
+ "1110001010010101101"
+ "1111100010101001011"
+ "0111110101011010100"
+ "0010111111111111110"
+ "0100010000000110110"
+ "0001110111110110101"
+ "0010110100010100110"
+ "1100010101010101100"
+ "0011110100010101010"
+ "1001010111110101000"
+ "0010010000000110001"
+ "0101011111111110011"
+ "0101001101101001011"
+ "0000101000101111000"
+ "1110001001100000111"
+ "0111000111001100110"
+ "0010001000011010110"
+ },
+ /* 96*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, "\015\015\012. , : !\"#$%&'()*+,-./:;<=>?[]{}", -1, 0, 19, 19, 0, 3, "All Punct; BWIPP: different encodation (immediate M/L P/L), same no. of codewords",
+ "1110101111101110010"
+ "1010100110011000111"
+ "1010000111000001001"
+ "1110001000011110101"
+ "1011110101101010100"
+ "1101111111111110111"
+ "1111110000000101000"
+ "0011110111110110101"
+ "0000010100010110100"
+ "1011110101010110000"
+ "0010010100010100111"
+ "0111010111110100011"
+ "1011010000000111110"
+ "0110011111111110001"
+ "0011000101011000111"
+ "0010100001011111101"
+ "1001101011101110101"
+ "0100100010000110110"
+ "1010111000111001100"
+ },
+ /* 97*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, "\015\015\012. , : !\"#$%&'()*+,-./:;<=>?[]{}", -1, 0, 19, 19, 0, 3, "Same as above; BWIPP: see above",
+ "1110101111101110010"
+ "1010100110011000111"
+ "1110010100111000001"
+ "1110111101001111101"
+ "1011110101101010000"
+ "0001111111111111011"
+ "0011110000000100100"
+ "1011110111110110101"
+ "0000010100010111000"
+ "1011110101010110000"
+ "0010010100010101111"
+ "0111010111110101111"
+ "1011010000000110110"
+ "0110011111111110101"
+ "0011000101011001011"
+ "0011010001011001001"
+ "1011001000100101101"
+ "0100100010000110110"
+ "1010111000111001100"
+ },
+ /* 98*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, -1, -1, { 0, 0, "" }, "09 UAG ^160MEUCIQC0sYS/HpKxnBELR1uB85R20OoqqwFGa0q2uEiYgh6utAIgLl1aBVM4EOTQtMQQYH9M2Z3Dp4qnA/fwWuQ+M8L3V8U=", -1, 0, 41, 41, 0, 3, "AZHighLevelEncoderTest::HighLevelEncode #9; BWIPP: different encodation, 1 codeword longer (probably due to bit-stuffing)",
+ "11111100011101111101100001110101010110010"
+ "11110101111100001000010101111011010100011"
+ "00111111111110100110110010101011101110011"
+ "01000110101010000100001001100100101000100"
+ "10101010101010101010101010101010101010101"
+ "01110001001000010010010001010101011100100"
+ "01011111000000101111111111111010111010111"
+ "10000011011110111010010010110100110000011"
+ "00001111100010010001110000110000011010001"
+ "10100001100101110010011101010011010000110"
+ "00111010110011100001101111101110000010010"
+ "11100100101110111011001101000010011000101"
+ "11101100110111000000111101010001010110100"
+ "01000001111001100101000001011010001101100"
+ "01011011010101111111111111110011010110101"
+ "10110011101011100000000000110011001000111"
+ "00001010101101101111111110100000111010100"
+ "01100100111110101000000010100000000001100"
+ "00001010101001101011111010111000011110010"
+ "10010011101101101010001010111110001001101"
+ "10101010101010101010101010101010101010101"
+ "00000111101000101010001010100111110000101"
+ "00101111001010101011111010111010111011011"
+ "00100001101111101000000010111110011100010"
+ "10011001110010101111111110100010110010010"
+ "00010100110000100000000000100000000001001"
+ "01101110100000111111111111110100110011110"
+ "00000101111110011010010100000111001100101"
+ "00111101111111011001101110110111101011101"
+ "10110000100000101010001010111000000100001"
+ "00011111010111000111100010010011010111100"
+ "01110100001000101101001111001110100100111"
+ "11001100101000110001111110011100101110001"
+ "10010010100101100011001001101010001101101"
+ "11111100110011111110110101111001101010110"
+ "01010001100101100111011001110111101000101"
+ "10101010101010101010101010101010101010101"
+ "10010110001000100010000101010000000100011"
+ "11001111101001010011101010011111011111000"
+ "01100010000101101001001011100001111100100"
+ "11111011001110100111100000001010110010001"
+ },
+ /* 99*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "09 UAG ^160MEUCIQC0sYS/HpKxnBELR1uB85R20OoqqwFGa0q2uEiYgh6utAIgLl1aBVM4EOTQtMQQYH9M2Z3Dp4qnA/fwWuQ+M8L3V8U=", -1, 0, 41, 41, 0, 3, "3 codewords longer than above; BWIPP: see above",
+ "11001111001110011111101110101010100110111"
+ "11110111000101101011000111011010100101111"
+ "00001100001011001101111001000110111010111"
+ "01110111001111101111000101101000010000001"
+ "10101010101010101010101010101010101010101"
+ "01110100001010011001010000001111001001100"
+ "01111111101011011100100001000111010011011"
+ "10110101000111001110000111010100111101000"
+ "00001001110110111101101010010111001011011"
+ "10110011001001000001001010101100001101100"
+ "00011110101000001110101011111101101010101"
+ "11000010011110000100010101110110001100011"
+ "11001111010110000000110010110110110011110"
+ "01100010001011100101000001010011101101000"
+ "01111110000011111111111111111010111111110"
+ "10100010101110100000000000111000101001001"
+ "00101110011000101111111110100010100010011"
+ "01000100010111101000000010110100101001010"
+ "00011011100110101011111010100100000111101"
+ "10110101011110101010001010110011001101100"
+ "10101010101010101010101010101010101010101"
+ "00000110001110101010001010101101011001001"
+ "00101101110100101011111010111100101010101"
+ "00000001011001101000000010111011010000000"
+ "10011111101111101111111110110110101110000"
+ "00000011111111100000000000101111001101000"
+ "01101000101000111111111111111000010110101"
+ "00100000100100000101010010001010100100101"
+ "00011100101000000010100111111101111011001"
+ "10010101110110001110011111111000011100101"
+ "00101111010111100001101001011011001111110"
+ "01000001100001000000001010010111011100111"
+ "11111101111101111111100010110011110010110"
+ "10100110001111100110010010011100101000011"
+ "11001011111110100110101100111111100111111"
+ "01010100011010111000011001011001111100000"
+ "10101010101010101010101010101010101010101"
+ "10110000001110001010010011001111001100010"
+ "11111101000011011111100111010101011011110"
+ "01100010000101101001001011100001100001001"
+ "11111011001110100111100000001010110111111"
+ },
+ /*100*/ { BARCODE_AZTEC, ESCAPE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "N\\x00N", -1, 0, 15, 15, 1, 3, "AZHighLevelEncoderTest::HighLevelEncodeBinary #1, encode 'N' in UPPER",
+ "001100001101111"
+ "011110101101001"
+ "111100000100111"
+ "111111111111110"
+ "110100000001000"
+ "110101111101101"
+ "001101000101001"
+ "000101010101111"
+ "100101000101000"
+ "000101111101011"
+ "000100000001001"
+ "000111111111110"
+ "010011101110001"
+ "111011000101011"
+ "011111110101100"
+ },
+ /*101*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "N\\x00N", -1, 0, 15, 15, 1, 3, "See above",
+ "001100001101111"
+ "011110101101001"
+ "111100000100111"
+ "111111111111110"
+ "110100000001000"
+ "110101111101101"
+ "001101000101001"
+ "000101010101111"
+ "100101000101000"
+ "000101111101011"
+ "000100000001001"
+ "000111111111110"
+ "010011101110001"
+ "111011000101011"
+ "011111110101100"
+ },
+ /*102*/ { BARCODE_AZTEC, ESCAPE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "N\\x00n", -1, 0, 15, 15, 1, 3, "AZHighLevelEncoderTest::HighLevelEncodeBinary #2, encode 'n' in BINARY",
+ "001010001000010"
+ "011010110010011"
+ "111100000100100"
+ "111111111111110"
+ "111100000001101"
+ "110101111101011"
+ "001101000101000"
+ "010101010101010"
+ "000101000101110"
+ "001101111101010"
+ "000100000001111"
+ "000111111111110"
+ "010011011110011"
+ "101011000111110"
+ "011111010011100"
+ },
+ /*103*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "N\\x00n", -1, 0, 15, 15, 0, 3, "Uses L/L for 'n' (3 bits longer); BWIPP: see above",
+ "001001000000101"
+ "011111010100010"
+ "111100000100100"
+ "111111111111100"
+ "111100000001110"
+ "110101111101000"
+ "001101000101011"
+ "000101010101011"
+ "100101000101101"
+ "001101111101001"
+ "000100000001111"
+ "000111111111100"
+ "010011011110010"
+ "100110100101000"
+ "110111111101110"
+ },
+ /*104*/ { BARCODE_AZTEC, ESCAPE_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, "N\\x00\\x80 A", -1, 0, 19, 19, 1, 899, "AZHighLevelEncoderTest::HighLevelEncodeBinary #3, short consecutive bytes",
+ "0110110011000110100"
+ "1100001110010000010"
+ "1101110111111011110"
+ "1101010011100010111"
+ "1101110100011011001"
+ "0000111111111110101"
+ "0100110000000111010"
+ "0010010111110101110"
+ "0011110100010111101"
+ "0011110101010101000"
+ "0010110100010111010"
+ "0100010111110110111"
+ "1011110000000100011"
+ "0000011111111111101"
+ "0011001000001000010"
+ "0001111001001000000"
+ "0001111110000110110"
+ "1101111000011101111"
+ "0000011011000001111"
+ },
+ /*105*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, "N\\x00\\x80 A", -1, 0, 19, 19, 1, 899, "Same as above",
+ "0110110011000110100"
+ "1100001110010000010"
+ "1101110111111011110"
+ "1101010011100010111"
+ "1101110100011011001"
+ "0000111111111110101"
+ "0100110000000111010"
+ "0010010111110101110"
+ "0011110100010111101"
+ "0011110101010101000"
+ "0010110100010111010"
+ "0100010111110110111"
+ "1011110000000100011"
+ "0000011111111111101"
+ "0011001000001000010"
+ "0001111001001000000"
+ "0001111110000110110"
+ "1101111000011101111"
+ "0000011011000001111"
+ },
+ /*106*/ { BARCODE_AZTEC, ESCAPE_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, "\\x00a\\xFF\\x80 A", -1, 0, 19, 19, 1, 899, "AZHighLevelEncoderTest::HighLevelEncodeBinary #4, skipping over single char 'a'",
+ "1101110001011000000"
+ "1110001101101000011"
+ "1010011010100011001"
+ "0001111011001011001"
+ "1011110100100010100"
+ "0010111111111110011"
+ "0001110000000110010"
+ "0010110111110111000"
+ "0101010100010110101"
+ "0011010101010100000"
+ "0111010100010110010"
+ "1000110111110101110"
+ "0011010000000111011"
+ "0111011111111110011"
+ "1110000010011001001"
+ "1101101011101110000"
+ "1101010100000010110"
+ "0100001000011001100"
+ "1100000010111101100"
+ },
+ /*107*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 0, -1, -1, 2, -1, { 0, 0, "" }, "\\x00a\\xFF\\x80 A", -1, 0, 19, 19, 0, 899, "Uses L/L for single char 'a'; BWIPP: same as above",
+ "1110100001111100000"
+ "1111111000100001001"
+ "1001101111111101100"
+ "0001001001101000000"
+ "0001110100110011011"
+ "1001111111111111011"
+ "0010010000000100110"
+ "0010110111110110010"
+ "0110110100010111100"
+ "0010010101010101111"
+ "1110010100010101010"
+ "1001010111110101101"
+ "0000010000000100101"
+ "0001011111111111011"
+ "1010001111100000011"
+ "1100010011011011111"
+ "1111100111100111001"
+ "0011110100001011000"
+ "1000111110000001100"
+ },
+ /*108*/ { BARCODE_AZTEC, ESCAPE_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "1234\\x00", -1, 0, 15, 15, 1, 3, "AZHighLevelEncoderTest::HighLevelEncodeBinary #5, B/S from D/L",
+ "001111101001010"
+ "111000001100000"
+ "111100000110100"
+ "001111111111111"
+ "011100000001101"
+ "101101111101010"
+ "101101000101100"
+ "000101010101011"
+ "100101000101001"
+ "101101111101111"
+ "111100000001100"
+ "010111111111110"
+ "110011000110001"
+ "111000001011000"
+ "011001000011001"
+ },
+ /*109*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "1234\\x00", -1, 0, 15, 15, 1, 3, "Same as above",
+ "001111101001010"
+ "111000001100000"
+ "111100000110100"
+ "001111111111111"
+ "011100000001101"
+ "101101111101010"
+ "101101000101100"
+ "000101010101011"
+ "100101000101001"
+ "101101111101111"
+ "111100000001100"
+ "010111111111110"
+ "110011000110001"
+ "111000001011000"
+ "011001000011001"
+ },
+ /*110*/ { BARCODE_AZTEC, ESCAPE_MODE, 0, -1, -1, 7, -1, { 0, 0, "" }, "\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8A\\x8B\\x8C\\x8D\\x8E\\x8F\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9A\\x9B\\x9C\\x9D\\x9E", -1, 0, 27, 27, 1, 899, "AZHighLevelEncoderTest::HighLevelEncodeBinary #6:31a",
+ "111011100110100100010101000"
+ "110010001000111001100100010"
+ "111101110000100100000110101"
+ "100110110110111111011011000"
+ "110001110110000010110110011"
+ "111001100001111100001111011"
+ "001100110001000000001111110"
+ "001111111111111111111011000"
+ "000000110000000000011001110"
+ "011101110111111111010100111"
+ "000000110100000001010100010"
+ "000101110101111101010001000"
+ "000011010101000101010100111"
+ "010101010101010101010101010"
+ "111111110101000101010011001"
+ "000000010101111101011111110"
+ "001100010100000001010000000"
+ "010000010111111111010010010"
+ "011100110000000000010111101"
+ "000111011111111111111110110"
+ "000100001011001010100000100"
+ "010000110100011001111010111"
+ "111100010000000111110111010"
+ "001101010101011111101001110"
+ "000101100111001101110011000"
+ "010001001100111010101010110"
+ "100011001000101000000010010"
+ },
+ /*111*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 0, -1, -1, 7, -1, { 0, 0, "" }, "\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8A\\x8B\\x8C\\x8D\\x8E\\x8F\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9A\\x9B\\x9C\\x9D\\x9E", -1, 0, 27, 27, 1, 899, "Same as above",
+ "111011100110100100010101000"
+ "110010001000111001100100010"
+ "111101110000100100000110101"
+ "100110110110111111011011000"
+ "110001110110000010110110011"
+ "111001100001111100001111011"
+ "001100110001000000001111110"
+ "001111111111111111111011000"
+ "000000110000000000011001110"
+ "011101110111111111010100111"
+ "000000110100000001010100010"
+ "000101110101111101010001000"
+ "000011010101000101010100111"
+ "010101010101010101010101010"
+ "111111110101000101010011001"
+ "000000010101111101011111110"
+ "001100010100000001010000000"
+ "010000010111111111010010010"
+ "011100110000000000010111101"
+ "000111011111111111111110110"
+ "000100001011001010100000100"
+ "010000110100011001111010111"
+ "111100010000000111110111010"
+ "001101010101011111101001110"
+ "000101100111001101110011000"
+ "010001001100111010101010110"
+ "100011001000101000000010010"
+ },
+ /*112*/ { BARCODE_AZTEC, ESCAPE_MODE, 0, -1, -1, 7, -1, { 0, 0, "" }, "a\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8A\\x8B\\x8C\\x8D\\x8E\\x8F\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9A\\x9B\\x9C\\x9D\\x9E", -1, 0, 27, 27, 0, 899, "AZHighLevelEncoderTest::HighLevelEncodeBinary #6:a31, L/L B/S(31); BWIPP: does B/S(32), one codeword longer",
+ "110100011001100010001000111"
+ "101001101010010101010001011"
+ "000101001110101111100101100"
+ "000100000110011010101110001"
+ "101011010111101110100110001"
+ "110110010100010110001100011"
+ "110100110001000000001101000"
+ "111010111111111111111000001"
+ "111000110000000000011111110"
+ "110110110111111111010101111"
+ "100100010100000001010010100"
+ "001110010101111101010011101"
+ "001011010101000101010010100"
+ "010101010101010101010101010"
+ "000110010101000101011101111"
+ "101010010101111101011000000"
+ "000001110100000001011111001"
+ "001001010111111111011010011"
+ "010100110000000000011001001"
+ "101011011111111111111001000"
+ "000100000100001110000101101"
+ "001000001101010011000100001"
+ "100111100100000001011101001"
+ "100001010110011110110110100"
+ "001110111010100101011111001"
+ "010010001100110001100000010"
+ "011000100010001100110101001"
+ },
+ /*113*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 0, -1, -1, 7, -1, { 0, 0, "" }, "a\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8A\\x8B\\x8C\\x8D\\x8E\\x8F\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9A\\x9B\\x9C\\x9D\\x9E", -1, 0, 27, 27, 0, 899, "Same as above; BWIPP: see above",
+ "110100011001100010001000111"
+ "101001101010010101010001011"
+ "000101001110101111100101100"
+ "000100000110011010101110001"
+ "101011010111101110100110001"
+ "110110010100010110001100011"
+ "110100110001000000001101000"
+ "111010111111111111111000001"
+ "111000110000000000011111110"
+ "110110110111111111010101111"
+ "100100010100000001010010100"
+ "001110010101111101010011101"
+ "001011010101000101010010100"
+ "010101010101010101010101010"
+ "000110010101000101011101111"
+ "101010010101111101011000000"
+ "000001110100000001011111001"
+ "001001010111111111011010011"
+ "010100110000000000011001001"
+ "101011011111111111111001000"
+ "000100000100001110000101101"
+ "001000001101010011000100001"
+ "100111100100000001011101001"
+ "100001010110011110110110100"
+ "001110111010100101011111001"
+ "010010001100110001100000010"
+ "011000100010001100110101001"
+ },
+ /*114*/ { BARCODE_AZTEC, ESCAPE_MODE, 0, -1, -1, 7, -1, { 0, 0, "" }, "\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8A\\x8B\\x8C\\x8D\\x8E\\x8F\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9A\\x9B\\x9C\\x9D\\x9Ea", -1, 0, 27, 27, 1, 899, "AZHighLevelEncoderTest::HighLevelEncodeBinary #6:31a, B/S(31) L/L",
+ "111011100110100100010101000"
+ "110010001000111001100100010"
+ "111101100011100001010000101"
+ "100110001001110101110111100"
+ "110010100100100001001100111"
+ "111010001011110000110101011"
+ "001110110001000000001011010"
+ "001111111111111111111101100"
+ "000001110000000000011001010"
+ "011110110111111111010000111"
+ "000001010100000001010000110"
+ "000110010101111101010011000"
+ "000001010101000101010110011"
+ "010101010101010101010101010"
+ "111111010101000101011000001"
+ "000010010101111101011111110"
+ "001110110100000001011110100"
+ "010000010111111111011011110"
+ "011101110000000000011110001"
+ "000100011111111111111011110"
+ "000111000100001110000000100"
+ "010010000110111111001110011"
+ "111101111011101100011110110"
+ "001101010101011111001111110"
+ "000101100111001101000010000"
+ "010001001100111010101010110"
+ "100011001000101000000010010"
+ },
+ /*115*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 0, -1, -1, 7, -1, { 0, 0, "" }, "\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8A\\x8B\\x8C\\x8D\\x8E\\x8F\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9A\\x9B\\x9C\\x9D\\x9Ea", -1, 0, 27, 27, 1, 899, "Same as above",
+ "111011100110100100010101000"
+ "110010001000111001100100010"
+ "111101100011100001010000101"
+ "100110001001110101110111100"
+ "110010100100100001001100111"
+ "111010001011110000110101011"
+ "001110110001000000001011010"
+ "001111111111111111111101100"
+ "000001110000000000011001010"
+ "011110110111111111010000111"
+ "000001010100000001010000110"
+ "000110010101111101010011000"
+ "000001010101000101010110011"
+ "010101010101010101010101010"
+ "111111010101000101011000001"
+ "000010010101111101011111110"
+ "001110110100000001011110100"
+ "010000010111111111011011110"
+ "011101110000000000011110001"
+ "000100011111111111111011110"
+ "000111000100001110000000100"
+ "010010000110111111001110011"
+ "111101111011101100011110110"
+ "001101010101011111001111110"
+ "000101100111001101000010000"
+ "010001001100111010101010110"
+ "100011001000101000000010010"
+ },
+ /*116*/ { BARCODE_AZTEC, ESCAPE_MODE, 0, -1, -1, 7, -1, { 0, 0, "" }, "a\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8A\\x8B\\x8C\\x8D\\x8E\\x8F\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9A\\x9B\\x9C\\x9D\\x9Eb", -1, 0, 27, 27, 0, 899, "AZHighLevelEncoderTest::HighLevelEncodeBinary #6:a31b; BWIPP: does B/S(33), 1 codeword longer",
+ "110100011001100010001000111"
+ "101001101010010101010001011"
+ "000101010000101111000010100"
+ "000111101010011001111001101"
+ "101010000011000100011111001"
+ "110100101000011011011011111"
+ "110111110001000000001001000"
+ "111011111111111111111010001"
+ "111001010000000000011111010"
+ "110101010111111111010010011"
+ "100110110100000001010100000"
+ "001100010101111101010001001"
+ "001011110101000101011110000"
+ "010101010101010101010101010"
+ "000100010101000101010110011"
+ "101011110101111101010111000"
+ "000010010100000001011110001"
+ "001011110111111111011010111"
+ "010100010000000000010111101"
+ "101011011111111111111000100"
+ "000111001110101110100000101"
+ "001001000110111110010100101"
+ "100111111101001101110101101"
+ "100001010110011110110011100"
+ "001110111010100101011001101"
+ "010010001100110001100000010"
+ "011000100010001100110101001"
+ },
+ /*117*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 0, -1, -1, 7, -1, { 0, 0, "" }, "a\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8A\\x8B\\x8C\\x8D\\x8E\\x8F\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9A\\x9B\\x9C\\x9D\\x9Eb", -1, 0, 27, 27, 0, 899, "Same as above; BWIPP: see above",
+ "110100011001100010001000111"
+ "101001101010010101010001011"
+ "000101010000101111000010100"
+ "000111101010011001111001101"
+ "101010000011000100011111001"
+ "110100101000011011011011111"
+ "110111110001000000001001000"
+ "111011111111111111111010001"
+ "111001010000000000011111010"
+ "110101010111111111010010011"
+ "100110110100000001010100000"
+ "001100010101111101010001001"
+ "001011110101000101011110000"
+ "010101010101010101010101010"
+ "000100010101000101010110011"
+ "101011110101111101010111000"
+ "000010010100000001011110001"
+ "001011110111111111011010111"
+ "010100010000000000010111101"
+ "101011011111111111111000100"
+ "000111001110101110100000101"
+ "001001000110111110010100101"
+ "100111111101001101110101101"
+ "100001010110011110110011100"
+ "001110111010100101011001101"
+ "010010001100110001100000010"
+ "011000100010001100110101001"
+ },
+ /*118*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 3, -1, { 0, 0, "" }, "§A§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§", -1, 0, 23, 23, 0, 3, "AZHighLevelEncoderTest::HighLevelEncodeBinary #7, B/S(1) A B/S(30); BWIPP: does B/S(32), 4 bits longer",
+ "11011101110111011101110"
+ "11100110011001100110011"
+ "10111010110111101111001"
+ "00100011101000110111101"
+ "01100101111101000010111"
+ "10010100111110000110110"
+ "10110011101000101101101"
+ "01101011111111111111001"
+ "11101101000000010110111"
+ "00010101011111011010110"
+ "01111101010001011001101"
+ "01100101010101011011001"
+ "11100001010001010110111"
+ "11010011011111011010110"
+ "11110101000000010011101"
+ "10100001111111111111001"
+ "10101100111101000000111"
+ "10010010010101000000110"
+ "10110100101010001111101"
+ "01001100110011001101001"
+ "11110111011101110110111"
+ "00110011001100110011010"
+ "11011101110111011101101"
+ },
+ /*119*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, 3, -1, { 0, 0, "" }, "§A§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§", -1, 0, 23, 23, 0, 3, "Same as above; BWIPP: see above",
+ "11011101110111011101110"
+ "11100110011001100110011"
+ "10111010110111101111001"
+ "00100011101000110111101"
+ "01100101111101000010111"
+ "10010100111110000110110"
+ "10110011101000101101101"
+ "01101011111111111111001"
+ "11101101000000010110111"
+ "00010101011111011010110"
+ "01111101010001011001101"
+ "01100101010101011011001"
+ "11100001010001010110111"
+ "11010011011111011010110"
+ "11110101000000010011101"
+ "10100001111111111111001"
+ "10101100111101000000111"
+ "10010010010101000000110"
+ "10110100101010001111101"
+ "01001100110011001101001"
+ "11110111011101110110111"
+ "00110011001100110011010"
+ "11011101110111011101101"
+ },
+ /*120*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 3, -1, { 0, 0, "" }, "§A§§§§§§§§§§§§§§§§§§§§§§§§§§§§§", -1, 0, 23, 23, 1, 3, "AZHighLevelEncoderTest::HighLevelEncodeBinary #8, B/S(31)",
+ "11001100110011001100110"
+ "11011101110111011101110"
+ "11111001000010110011010"
+ "10111001111111010100111"
+ "11010100001111101111111"
+ "11000100000001101000000"
+ "01111011101000001110010"
+ "00111111111111111010111"
+ "11011001000000010001111"
+ "10001011011111011101100"
+ "10110001010001010101110"
+ "00110001010101011000011"
+ "00010101010001011111011"
+ "11000011011111010011100"
+ "01110111000000010011110"
+ "00110101111111111010011"
+ "11011100111011000001011"
+ "11001111000111111011100"
+ "01111010010100000111110"
+ "00110111011101110110011"
+ "11100110011001100111011"
+ "11011101110111011101100"
+ "10011001100110011001110"
+ },
+ /*121*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, 3, -1, { 0, 0, "" }, "§A§§§§§§§§§§§§§§§§§§§§§§§§§§§§§", -1, 0, 23, 23, 0, 3, "B/S(1) A B/S(29); BWIPP: same as above",
+ "11011101110111011101110"
+ "11100110011001100110011"
+ "10110001011011100010101"
+ "00100000110101111000001"
+ "01101001010111010111111"
+ "10011100110001011111110"
+ "10111011101000001101101"
+ "01101011111111111101001"
+ "11101011000000011100111"
+ "00010011011111010110110"
+ "01111101010001010011101"
+ "01101001010101010001001"
+ "11100001010001010100111"
+ "11010101011111010000110"
+ "11110111000000011111101"
+ "10100101111111111111001"
+ "01100100110111000010111"
+ "10010011000010100000110"
+ "10110111010001110101101"
+ "01001100110011001101001"
+ "11110111011101110110111"
+ "00110011001100110011010"
+ "11011101110111011101101"
+ },
+ /*122*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 4, -1, { 0, 0, "" }, "§A§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§", -1, 0, 27, 27, 0, 3, "AZHighLevelEncoderTest::HighLevelEncodeBinary #9, B/S(31) B/S(3); BWIPP: B/S(34)",
+ "110011001100110011001100110"
+ "110111011101110111011101110"
+ "111111011111011111111110010"
+ "101101101000010000110111011"
+ "110110000110011100010111111"
+ "110011001100011101001101100"
+ "011111101000100000101000010"
+ "001101010001101111001111111"
+ "110100011111100100110011111"
+ "100001011111111111110011100"
+ "101100000100000001010001010"
+ "001110000101111101011010111"
+ "000110011101000101001000011"
+ "110010111101010101000010000"
+ "011110111101000101001011010"
+ "001111010101111101010111111"
+ "110110011100000001111110111"
+ "110001000111111111111010000"
+ "011100010001000110001100010"
+ "001110111111010001001101111"
+ "110101011010000100001111111"
+ "110010010100010110100101000"
+ "011110001110110111100010110"
+ "001101110111000100110010111"
+ "111001100111110111011101111"
+ "110111011101110111011101100"
+ "100110011001100110011001110"
+ },
+ /*123*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, 4, -1, { 0, 0, "" }, "§A§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§", -1, 0, 27, 27, 0, 3, "B/S(1) A B/S(31) B/S(1); BWIPP: B/S(34), 1 codeword shorter",
+ "110111011101110111011101110"
+ "111001100110011001100110011"
+ "101111110101001111000001101"
+ "001010001101001011000000001"
+ "011001000110110101001000011"
+ "100110011101111100111101110"
+ "101110010000011010100110001"
+ "011001010010110000001111101"
+ "111001101111100100100101011"
+ "000111001111111111111111110"
+ "011111111100000001100010001"
+ "011010100101111101110100101"
+ "111011101101000101000111111"
+ "110111111101010101111000110"
+ "111111011101000101100100001"
+ "101000111101111101010001101"
+ "111000011100000001011011111"
+ "100110100111111111100011110"
+ "101110100001110110010010001"
+ "011010100110011011101101001"
+ "111001110100011010110101111"
+ "100101000100111000010100010"
+ "101101011010101110111010001"
+ "010011001100110011001110101"
+ "111101110111011101110111111"
+ "001100110011001100110011010"
+ "110111011101110111011101101"
+ },
+ /*124*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 9, -1, { 0, 0, "" }, "§§§§§§§§§§§§§§§§§§§§§§§§§§§§§A§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§", -1, 0, 37, 37, 1, 3, "AZHighLevelEncoderTest::HighLevelEncodeBinary #10, B/S(64)",
+ "1110101110111011101111011101110111101"
+ "1101110011001100110001100110011001010"
+ "1010101010101010101010101010101010101"
+ "1000011011101110110101110111011101001"
+ "0010001100110011001110011001100110111"
+ "0000110111110001000100000000111101010"
+ "0011001010000010001001000111011111101"
+ "0001011011010110000101110001111110001"
+ "0110110111100111111111010111001101111"
+ "1001110000101010000100001101100101010"
+ "0011001000100010011110000011100011101"
+ "0101011100111001000000010110101010001"
+ "1010110111111111111111111101111001111"
+ "1001110000101000000000001001000101010"
+ "0111001101011011111111101010000111101"
+ "1101011000011010000000101000000010001"
+ "1010110111001010111110101000011101111"
+ "1001110001111010100010101110000101010"
+ "1010101010101010101010101010101010101"
+ "0101001011111010100010101010111111001"
+ "1111011101001010111110101101100110101"
+ "1000110011001010000000101101011101011"
+ "1011110110011011111111101010001001110"
+ "0101001111111000000000001101110011001"
+ "1111011011101111111111111101000110101"
+ "1000110011000101100001100001011101011"
+ "1011110000110011111010011100011101110"
+ "0101001011100001010101101001110111001"
+ "1111011101000010011101101000010110101"
+ "1000110100010110100010000110011101011"
+ "1011101111001110011100000110010101110"
+ "0101010110000100000111110110101111001"
+ "1110110011001100111001100110011010101"
+ "1001011101110111010110111011101101011"
+ "1010101010101010101010101010101010101"
+ "0101001100110011000110011001100110010"
+ "1011110111011101111011101110111011101"
+ },
+ /*125*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, 9, -1, { 0, 0, "" }, "§§§§§§§§§§§§§§§§§§§§§§§§§§§§§A§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§", -1, 0, 37, 37, 0, 3, "B/S(29) A B/S(31) B/S(3), 1 codeword longer; BWIPP same as above",
+ "1111111101100110011100110011001100111"
+ "1100111000101110110101110111011101011"
+ "1010101010101010101010101010101010101"
+ "1101100110011001100011001100110011000"
+ "1011101110111011101111011101110111110"
+ "1000111011011010100110010101000000011"
+ "1110011101100010011011110100110110111"
+ "0101101010001010110001010111001111000"
+ "0011100000111000101000101000010111110"
+ "1100111110111101000101001101110000011"
+ "1110011100010101001001101001010010111"
+ "0101101000111001000000010101110011000"
+ "0011100111011111111111111100011011110"
+ "1100111001101000000000001010100100011"
+ "1110011111111011111111101000101010111"
+ "0101101001001010000000101011011111000"
+ "0011100100011010111110101000001111110"
+ "1100111110011010100010101111001100011"
+ "1010101010101010101010101010101010101"
+ "1100011001101010100010101100010110011"
+ "0111111111101010111110101111000011100"
+ "0001110100111010000000101010000011010"
+ "1110110001111011111111101110100000111"
+ "1100000000011000000000001011100110011"
+ "0111111011001111111111111100001111100"
+ "0001110101100010000011110010110011010"
+ "1110110100101000001100000110100000111"
+ "1100001001101110000101101011110110011"
+ "0111111000100110001110011011010011100"
+ "0001110011111001000100001011100011010"
+ "1110101100111110011110111011110100111"
+ "1100010111011011110010001101100110011"
+ "0111110111011101111011101110111011100"
+ "0001100110011001100011001100110011010"
+ "1010101010101010101010101010101010101"
+ "1101011101110111010110111011101110011"
+ "1110011001100110011100110011001100111"
+ },
+ /*126*/ { BARCODE_AZTEC, DATA_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "ABC. DEF\015\012", -1, 0, 15, 15, 1, 3, "AZHighLevelEncoderTest::HighLevelEncodePairs #1, typical",
+ "000011010111100"
+ "001010001001001"
+ "011100001000100"
+ "001111111111110"
+ "000100000001001"
+ "110101111101001"
+ "000101000101111"
+ "101101010101111"
+ "001101000101100"
+ "001101111101001"
+ "000100000001100"
+ "000111111111100"
+ "010001010010000"
+ "100010010001011"
+ "101101011000001"
+ },
+ /*127*/ { BARCODE_AZTEC, FAST_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "ABC. DEF\015\012", -1, 0, 15, 15, 1, 3, "Same as above",
+ "000011010111100"
+ "001010001001001"
+ "011100001000100"
+ "001111111111110"
+ "000100000001001"
+ "110101111101001"
+ "000101000101111"
+ "101101010101111"
+ "001101000101100"
+ "001101111101001"
+ "000100000001100"
+ "000111111111100"
+ "010001010010000"
+ "100010010001011"
+ "101101011000001"
+ },
+ /*128*/ { BARCODE_AZTEC, DATA_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "A. : , \015\012", -1, 0, 15, 15, 1, 3, "AZHighLevelEncoderTest::HighLevelEncodePairs #2, P/L rather than shift",
+ "001001100000011"
+ "000100011101111"
+ "011100000100111"
+ "011111111111111"
+ "111100000001110"
+ "010101111101010"
+ "111101000101001"
+ "110101010101001"
+ "000101000101100"
+ "001101111101011"
+ "110100000001100"
+ "000111111111110"
+ "100011011110011"
+ "010011011100101"
+ "100000001101101"
+ },
+ /*129*/ { BARCODE_AZTEC, FAST_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "A. : , \015\012", -1, 0, 15, 15, 1, 3, "Same as above",
+ "001001100000011"
+ "000100011101111"
+ "011100000100111"
+ "011111111111111"
+ "111100000001110"
+ "010101111101010"
+ "111101000101001"
+ "110101010101001"
+ "000101000101100"
+ "001101111101011"
+ "110100000001100"
+ "000111111111110"
+ "100011011110011"
+ "010011011100101"
+ "100000001101101"
+ },
+ /*130*/ { BARCODE_AZTEC, DATA_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "A. 1234", -1, 0, 15, 15, 1, 3, "AZHighLevelEncoderTest::HighLevelEncodePairs #3, D/L rather than P/S",
+ "001000101011110"
+ "000111011110100"
+ "011100000100100"
+ "011111111111111"
+ "111100000001100"
+ "100101111101011"
+ "111101000101001"
+ "010101010101010"
+ "000101000101111"
+ "011101111101001"
+ "000100000001100"
+ "110111111111100"
+ "010011011110001"
+ "011101100110110"
+ "000011001110010"
+ },
+ /*131*/ { BARCODE_AZTEC, FAST_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "A. 1234", -1, 0, 15, 15, 1, 3, "Same as above",
+ "001000101011110"
+ "000111011110100"
+ "011100000100100"
+ "011111111111111"
+ "111100000001100"
+ "100101111101011"
+ "111101000101001"
+ "010101010101010"
+ "000101000101111"
+ "011101111101001"
+ "000100000001100"
+ "110111111111100"
+ "010011011110001"
+ "011101100110110"
+ "000011001110010"
+ },
+ /*132*/ { BARCODE_AZTEC, DATA_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "A\200. \200", -1, 0, 15, 15, 1, 899, "AZHighLevelEncoderTest::HighLevelEncodePairs #4, don't bother leaving B/S",
+ "001010110010010"
+ "000110111100010"
+ "011100001000101"
+ "011111111111111"
+ "110100000001010"
+ "110101111101011"
+ "000101000101100"
+ "101101010101101"
+ "011101000101101"
+ "001101111101011"
+ "000100000001110"
+ "000111111111110"
+ "010001010010011"
+ "001000000001111"
+ "011101001000011"
+ },
+ /*133*/ { BARCODE_AZTEC, FAST_MODE, 0, -1, -1, 1, -1, { 0, 0, "" }, "A\200. \200", -1, 0, 15, 15, 0, 899, "Leaves B/S, 6 bits longer; BWIPP: same as above",
+ "001001100101011"
+ "001001101011110"
+ "011100001000100"
+ "011111111111101"
+ "110100000001000"
+ "110101111101011"
+ "000101000101101"
+ "001101010101111"
+ "111101000101111"
+ "001101111101011"
+ "000100000001110"
+ "000111111111101"
+ "010001010010011"
+ "001011110010010"
+ "000001110010000"
+ },
+ /*134*/ { BARCODE_AZTEC, DATA_MODE, 3, -1, -1, 1, -1, { 0, 0, "" }, "\101\300", -1, 0, 15, 15, 1, 899, "AÀ",
"000000101011100"
"000100010100111"
"001100000110110"
@@ -2496,7 +4354,7 @@ static void test_encode(const testCtx *const p_ctx) {
"110001000111110"
"111001100011011"
},
- /* 71*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, 3, -1, -1, 1, -1, { 0, 0, "" }, "\101\300", -1, 0, 15, 15, 1, 899, "Same as above",
+ /*135*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, 3, -1, -1, 1, -1, { 0, 0, "" }, "\101\300", -1, 0, 15, 15, 1, 899, "Same as above",
"000000101011100"
"000100010100111"
"001100000110110"
@@ -2513,7 +4371,7 @@ static void test_encode(const testCtx *const p_ctx) {
"110001000111110"
"111001100011011"
},
- /* 72*/ { BARCODE_AZTEC, UNICODE_MODE, 26, -1, -1, 1, -1, { 0, 0, "" }, "AÀ", -1, 0, 15, 15, 1, 1, "AÀ",
+ /*136*/ { BARCODE_AZTEC, UNICODE_MODE, 26, -1, -1, 1, -1, { 0, 0, "" }, "AÀ", -1, 0, 15, 15, 1, 1, "AÀ",
"001111011000101"
"000110100011000"
"001100001000111"
@@ -2530,7 +4388,7 @@ static void test_encode(const testCtx *const p_ctx) {
"001100010010010"
"011110110011000"
},
- /* 73*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 26, -1, -1, 1, -1, { 0, 0, "" }, "AÀ", -1, 0, 15, 15, 1, 1, "Same as above",
+ /*137*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 26, -1, -1, 1, -1, { 0, 0, "" }, "AÀ", -1, 0, 15, 15, 1, 1, "Same as above",
"001111011000101"
"000110100011000"
"001100001000111"
@@ -2547,7 +4405,7 @@ static void test_encode(const testCtx *const p_ctx) {
"001100010010010"
"011110110011000"
},
- /* 74*/ { BARCODE_AZTEC, ESCAPE_MODE, 899, -1, -1, 1, -1, { 0, 0, "" }, "\\xC3\\x95\\xAB", -1, 0, 15, 15, 1, 1, "Blank top row",
+ /*138*/ { BARCODE_AZTEC, ESCAPE_MODE, 899, -1, -1, 1, -1, { 0, 0, "" }, "\\xC3\\x95\\xAB", -1, 0, 15, 15, 1, 1, "Blank top row",
"000000000000000"
"001111111011111"
"001100001010111"
@@ -2564,7 +4422,7 @@ static void test_encode(const testCtx *const p_ctx) {
"111101100110011"
"011100110010101"
},
- /* 75*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 899, -1, -1, 1, -1, { 0, 0, "" }, "\\xC3\\x95\\xAB", -1, 0, 15, 15, 1, 1, "Blank top row",
+ /*139*/ { BARCODE_AZTEC, ESCAPE_MODE | FAST_MODE, 899, -1, -1, 1, -1, { 0, 0, "" }, "\\xC3\\x95\\xAB", -1, 0, 15, 15, 1, 1, "Blank top row",
"000000000000000"
"001111111011111"
"001100001010111"
@@ -2581,7 +4439,7 @@ static void test_encode(const testCtx *const p_ctx) {
"111101100110011"
"011100110010101"
},
- /* 76*/ { BARCODE_AZTEC, UNICODE_MODE, 100, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "FLG(3)",
+ /*140*/ { BARCODE_AZTEC, UNICODE_MODE, 100, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "FLG(3)",
"001101001111101"
"000000111011100"
"001100000100101"
@@ -2598,7 +4456,7 @@ static void test_encode(const testCtx *const p_ctx) {
"100011101111100"
"000111110001110"
},
- /* 77*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 100, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "Same as above",
+ /*141*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 100, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "Same as above",
"001101001111101"
"000000111011100"
"001100000100101"
@@ -2615,7 +4473,7 @@ static void test_encode(const testCtx *const p_ctx) {
"100011101111100"
"000111110001110"
},
- /* 78*/ { BARCODE_AZTEC, UNICODE_MODE, 1000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "FLG(4)",
+ /*142*/ { BARCODE_AZTEC, UNICODE_MODE, 1000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "FLG(4)",
"001010100011011"
"001000100000101"
"001100000100111"
@@ -2632,7 +4490,7 @@ static void test_encode(const testCtx *const p_ctx) {
"101000000111010"
"000001110101111"
},
- /* 79*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 1000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "Same as above",
+ /*143*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 1000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "Same as above",
"001010100011011"
"001000100000101"
"001100000100111"
@@ -2649,7 +4507,7 @@ static void test_encode(const testCtx *const p_ctx) {
"101000000111010"
"000001110101111"
},
- /* 80*/ { BARCODE_AZTEC, UNICODE_MODE, 10000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "FLG(5)",
+ /*144*/ { BARCODE_AZTEC, UNICODE_MODE, 10000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "FLG(5)",
"000100110110010"
"000001000010111"
"001100000110101"
@@ -2666,7 +4524,7 @@ static void test_encode(const testCtx *const p_ctx) {
"101010001110110"
"000000011000101"
},
- /* 81*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 10000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "Same as above",
+ /*145*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 10000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "Same as above",
"000100110110010"
"000001000010111"
"001100000110101"
@@ -2683,7 +4541,7 @@ static void test_encode(const testCtx *const p_ctx) {
"101010001110110"
"000000011000101"
},
- /* 82*/ { BARCODE_AZTEC, UNICODE_MODE, 100000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "FLG(6)",
+ /*146*/ { BARCODE_AZTEC, UNICODE_MODE, 100000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "FLG(6)",
"000010010000010"
"001101000100110"
"001100000110111"
@@ -2700,7 +4558,7 @@ static void test_encode(const testCtx *const p_ctx) {
"101010100011011"
"000000000111010"
},
- /* 83*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 100000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "Same as above",
+ /*147*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 100000, -1, -1, 1, -1, { 0, 0, "" }, "A", -1, 0, 15, 15, 1, 1, "Same as above",
"000010010000010"
"001101000100110"
"001100000110111"
@@ -2717,7 +4575,7 @@ static void test_encode(const testCtx *const p_ctx) {
"101010100011011"
"000000000111010"
},
- /* 84*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", -1, 0, 61, 61, 1, 1, "Zint website example ss_6.png NOTE now ends with D/L . instead of P/S .",
+ /*148*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", -1, 0, 61, 61, 1, 1, "Zint website example ss_6.png NOTE now ends with D/L . instead of P/S .",
"0010110111101110101100000101001101110100010000100111011100001"
"0001100000000000001101110010000100010101110011000001000011110"
"0001111110101010100101000110101101000110011000101111011100110"
@@ -2780,7 +4638,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110000011010000000000100001100001000111011110011010000000001"
"0000010101001111100010001001111100101000010001110010010101101"
},
- /* 85*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", -1, 0, 61, 61, 1, 1, "Same as above",
+ /*149*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", -1, 0, 61, 61, 1, 1, "Same as above",
"0010110111101110101100000101001101110100010000100111011100001"
"0001100000000000001101110010000100010101110011000001000011110"
"0001111110101010100101000110101101000110011000101111011100110"
@@ -2843,36 +4701,36 @@ static void test_encode(const testCtx *const p_ctx) {
"1110000011010000000000100001100001000111011110011010000000001"
"0000010101001111100010001001111100101000010001110010010101101"
},
- /* 86*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 4, -1, { 0, 0, "" }, "Colon: etc. NUM. 12345, num. 12345 @, 123. . . . . @.¡.!A ", -1, 0, 27, 27, 1, 1, "",
+ /*150*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, 4, -1, { 0, 0, "" }, "Colon: etc. NUM. 12345, num. 12345 @, 123. . . . . @.¡.!A ", -1, 0, 27, 27, 0, 1, "BWIPP: different encodation, same no. of codewords",
"001010110110111011010110111"
"100111110010100000100001110"
- "011000101010111011100000011"
- "110101011010011111110010100"
- "001100001100010000101000011"
- "100110011110010000001010101"
- "001110011011000100001000011"
- "001110100110011001101000111"
- "110100111111101010110101100"
- "011001101111111111111110101"
- "100010010100000001001010011"
- "000010111101111101110101001"
- "001011110101000101010110011"
- "110111010101010101000000110"
- "111010100101000101001110100"
- "001010001101111101110110100"
- "000001000100000001001001111"
- "001000000111111111101000111"
- "011100010011100010001000010"
- "011110011001001111111000001"
- "000111001101011100110100010"
- "111111100110110011101000010"
- "010110011001000100001101010"
- "011100101001010011110101000"
- "011100100101001011111111010"
+ "011011110101011111110010111"
+ "110111001001100001110000000"
+ "001100100110111110100000011"
+ "100100010101010001010100001"
+ "001100101101110001001001011"
+ "001111111110010001100110011"
+ "110101101111101010111011100"
+ "011001101111111111110101001"
+ "100011100100000001000101011"
+ "000001011101111101101000101"
+ "001000110101000101001100011"
+ "110100110101010101010010010"
+ "111011010101000101010111000"
+ "001010011101111101101111000"
+ "000011110100000001011011111"
+ "001001000111111111101101011"
+ "011111010011100010010001010"
+ "011000110001110000011000001"
+ "001011101010000110110000010"
+ "110001000101111101101100010"
+ "011110111100111111000000110"
+ "010001000100010001111100100"
+ "011101110111011101101100110"
"001101101101111011110110111"
"010111000110110101011100000"
},
- /* 87*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "Colon: etc. NUM. 12345, num. 12345 @, 123. . . . . @.¡.!A ", -1, 0, 27, 27, 0, 1, "BWIPP different encodation (3 codewords less, see above)",
+ /*151*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "Colon: etc. NUM. 12345, num. 12345 @, 123. . . . . @.¡.!A ", -1, 0, 27, 27, 0, 1, "BWIPP different encodation (3 codewords less, see above)",
"001011011101101011011110111"
"101001010000010000111010101"
"011111000001110001101101111"
@@ -2901,32 +4759,32 @@ static void test_encode(const testCtx *const p_ctx) {
"000000111111011010100010100"
"010000011101011110110000100"
},
- /* 88*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 3, -1, { 0, 0, "" }, "1. 1a @ A@@ @@!!@@!!1!!!!¡a ", -1, 0, 23, 23, 0, 1, "BWIPP different encodation, same no. of codewords",
+ /*152*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 3, -1, { 0, 0, "" }, "1. 1a @ A@@ @@!!@@!!1!!!!¡a ", -1, 0, 23, 23, 0, 1, "BWIPP different encodation, same no. of codewords",
"11001000100010001001111"
"11100010101000100010011"
- "00001001010101100111100"
- "01100000001100000111010"
- "11001100011010101000110"
- "10010010111011111110101"
- "10001111100110101001001"
- "00100111111111111000001"
- "10000001000000010011110"
- "01011011011111011110010"
- "11001011010001011001100"
- "11101101010101010100000"
- "01000111010001011001100"
- "11011101011111011101011"
- "00100011000000010101100"
- "00100001111111111100100"
- "01000000001100000100000"
- "01011111010000001111000"
- "11010011010101111010001"
- "01001001111110100000001"
- "00100001110000100011000"
+ "00001011010111011100100"
+ "01101010001110110111010"
+ "11000000100001011010110"
+ "10010010111100100011001"
+ "10000011100110101111101"
+ "00101111111111111101001"
+ "10001101000000010000110"
+ "01010111011111011110110"
+ "11000111010001011010000"
+ "11101101010101010001100"
+ "01000011010001011110100"
+ "11010101011111011010011"
+ "00100011000000010000100"
+ "00100001111111111011100"
+ "01001000001100000100000"
+ "00010011101000100100000"
+ "00011011001111100100101"
+ "01001001101010110001101"
+ "11100001100001011101000"
"01100011101111001100010"
- "01000011000010110000011"
+ "11000011000010110000011"
},
- /* 89*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "1. 1a @ A@@ @@!!@@!!1!!!!¡a ", -1, 0, 23, 23, 0, 1, "BWIPP different encodation, less codewords (better use of B/S)",
+ /*153*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "1. 1a @ A@@ @@!!@@!!1!!!!¡a ", -1, 0, 23, 23, 0, 1, "BWIPP different encodation, less codewords (better use of B/S)",
"11110101100111101010011"
"11111111110111111001011"
"00000000001000011111000"
@@ -2951,36 +4809,86 @@ static void test_encode(const testCtx *const p_ctx) {
"01100011101111001100010"
"11000011000010110000011"
},
- /* 90*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "1234\01512\015AB\015AB\015ab\015ab\01512\015ab\015!\015!\015a,a,1,a,@,", -1, 0, 27, 27, 0, 1, "BWIPP different encodation, same no. of codewords",
+ /*154*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "1\015AB\015ab\01512\015ab\015!", -1, 0, 23, 23, 0, 1, "Early D/L; BWIPP different encodation, early D/L also but 1 codeword longer due to bit-stuffing only",
+ "11000011011011100010110"
+ "11100100010101100110011"
+ "00011111000010000001011"
+ "01010000111100010111110"
+ "10101100001000000011010"
+ "00111111111111111111111"
+ "00001100000000000100111"
+ "00011101111111110110110"
+ "01001101000000010101000"
+ "11100101011111010110001"
+ "11110101010001010101000"
+ "01010101010101010101010"
+ "00001101010001010110100"
+ "00110101011111010101001"
+ "10100101000000010111011"
+ "00110101111111110100001"
+ "01010100000000000100011"
+ "10010111111111111110010"
+ "00000011101001010000110"
+ "00110101010110110100100"
+ "00110100111001110011100"
+ "11100000111100001101100"
+ "00110010011010000001000"
+ },
+ /*155*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "1\015AB\015ab\01512\015ab\015!", -1, 0, 23, 23, 0, 1, "1 bit longer (does not do early D/L); BWIPP: see above",
+ "11011010110011010001000"
+ "11010010110111110000100"
+ "00010100100010010010100"
+ "01001010010101001101000"
+ "10001100001000000011011"
+ "00101111111111111111000"
+ "00010100000000000101000"
+ "00100101111111110110010"
+ "01000101000000010101100"
+ "11110101011111010110000"
+ "11001101010001010110011"
+ "01010101010101010101010"
+ "00001101010001010101110"
+ "00111101011111010110011"
+ "10001101000000010110111"
+ "00001101111111110101110"
+ "01001100000000000110000"
+ "11010111111111111111000"
+ "11000001000001011000000"
+ "01100001100100011100100"
+ "01110001000010101100101"
+ "11100100110101010110001"
+ "10100000111011111111010"
+ },
+ /*156*/ { BARCODE_AZTEC, UNICODE_MODE, 0, -1, -1, -1, ZINT_AZTEC_FULL, { 0, 0, "" }, "1234\01512\015AB\015AB\015ab\015ab\01512\015ab\015!\015!\015a,a,1,a,@,", -1, 0, 27, 27, 0, 1, "BWIPP different encodation, same no. of codewords (but 1 bit longer)",
"110001111110000001011000000"
"110000100110011001111000001"
- "000100010101100100111100011"
- "011000101101110000110010100"
- "100101110011100110011110110"
- "101101111001110100000000100"
- "000010110001000000001011100"
- "100001111111111111111100100"
- "100001010000000000011111100"
- "110100110111111111010010011"
- "000101110100000001010000111"
- "001010010101111101011100011"
- "000100010101000101010110000"
+ "000100000110100101010000111"
+ "011011010001111001010010000"
+ "100110110111101010100110110"
+ "101111011010011000010010000"
+ "000011110001000000001010000"
+ "100001111111111111111110100"
+ "100011010000000000011111100"
+ "110110110111111111010000011"
+ "000100110100000001010110111"
+ "001010010101111101011100111"
+ "000101010101000101010011100"
"010101010101010101010101010"
- "001100110101000101011100000"
- "010110110101111101010010110"
- "001111010100000001010110100"
- "110010110111111111010011010"
- "010010110000000000010001100"
- "000101011111111111111011100"
- "000000001100100100000110000"
- "000011011001010110111110100"
- "000000100101101011001000011"
+ "001110110101000101011101000"
+ "010100110101111101010000110"
+ "001100010100000001010010100"
+ "110000110111111111010011010"
+ "010001110000000000010011100"
+ "000100011111111111111111100"
+ "000001001100100100000110000"
+ "000011001011010100011010100"
+ "000011011100101101100000011"
"000000011100111011110010000"
"111010111010001101010000000"
"100001000000010010000011010"
"100100100001001001000011000"
},
- /* 91*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "1234\01512\015AB\015AB\015ab\015ab\01512\015ab\015!\015!\015a,a,1,a,@,", -1, 0, 27, 27, 0, 1, "BWIPP different encodation, less codewords (better use of P/S CRs)",
+ /*157*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "1234\01512\015AB\015AB\015ab\015ab\01512\015ab\015!\015!\015a,a,1,a,@,", -1, 0, 27, 27, 0, 1, "BWIPP different encodation, less codewords (better use of P/S CRs)",
"111111110000010110000011001"
"110110110010011110100000101"
"000011100001000111001100111"
@@ -3009,7 +4917,7 @@ static void test_encode(const testCtx *const p_ctx) {
"000110100001100100110010100"
"101110010000110000111111101"
},
- /* 92*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 6, -1, { 0, 0, "" }, "AA!! ", -1, 0, 23, 23, 1, 1, "",
+ /*158*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 6, -1, { 0, 0, "" }, "AA!! ", -1, 0, 23, 23, 1, 1, "",
"00110111000010111110110"
"01011001101100101011001"
"00101000101000011110111"
@@ -3034,7 +4942,7 @@ static void test_encode(const testCtx *const p_ctx) {
"00111110110110100011111"
"10010010100010101110001"
},
- /* 93*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 6, -1, { 0, 0, "" }, "AA!! ", -1, 0, 23, 23, 1, 1, "Same as above",
+ /*159*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 6, -1, { 0, 0, "" }, "AA!! ", -1, 0, 23, 23, 1, 1, "Same as above",
"00110111000010111110110"
"01011001101100101011001"
"00101000101000011110111"
@@ -3059,7 +4967,24 @@ static void test_encode(const testCtx *const p_ctx) {
"00111110110110100011111"
"10010010100010101110001"
},
- /* 94*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\015\012", -1, 0, 15, 15, 1, 1, "",
+ /*160*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\015\012", -1, 0, 15, 15, 0, 1, "M/L then P/L; BWIPP: 2 P/Ss, same no. of codewords",
+ "000110110010111"
+ "110011010101001"
+ "101100000010111"
+ "101111111111110"
+ "111100000001110"
+ "101101111101110"
+ "110101000101101"
+ "110101010101100"
+ "000101000101001"
+ "001101111101100"
+ "101100000001111"
+ "110111111111100"
+ "110000101000000"
+ "011111010010100"
+ "101001100010000"
+ },
+ /*161*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\015\012", -1, 0, 15, 15, 1, 1, "See above",
"001100000001000"
"000100001000000"
"001100000010111"
@@ -3076,24 +5001,7 @@ static void test_encode(const testCtx *const p_ctx) {
"100100100100110"
"111100100110111"
},
- /* 95*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 1, -1, { 0, 0, "" }, "\015\015\012", -1, 0, 15, 15, 1, 1, "Same as above",
- "001100000001000"
- "000100001000000"
- "001100000010111"
- "011111111111111"
- "001100000001111"
- "001101111101100"
- "100101000101110"
- "000101010101111"
- "000101000101000"
- "011101111101101"
- "001100000001101"
- "100111111111110"
- "110000101000000"
- "100100100100110"
- "111100100110111"
- },
- /* 96*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\015\015\012. , ; β", -1, ZINT_WARN_USES_ECI, 19, 19, 1, 1, "",
+ /*162*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\015\015\012. , ; β", -1, ZINT_WARN_USES_ECI, 19, 19, 1, 1, "",
"1101110010010001101"
"1000110110100010001"
"1101111111111001001"
@@ -3114,7 +5022,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0100110110001110011"
"0101001111001110011"
},
- /* 97*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\015\015\012. , ; β", -1, ZINT_WARN_USES_ECI, 19, 19, 1, 1, "Same as above",
+ /*163*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\015\015\012. , ; β", -1, ZINT_WARN_USES_ECI, 19, 19, 1, 1, "Same as above",
"1101110010010001101"
"1000110110100010001"
"1101111111111001001"
@@ -3135,7 +5043,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0100110110001110011"
"0101001111001110011"
},
- /* 98*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 36, -1, { 0, 0, "" }, "Lorem ipsum dolor sit amet.", -1, 0, 151, 151, 1, 1, "Max version 151x151",
+ /*164*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 36, -1, { 0, 0, "" }, "Lorem ipsum dolor sit amet.", -1, 0, 151, 151, 1, 1, "Max version 151x151",
"0110011000001101111010100010010110101010100001110111111001101101010000111100111111111001000011100001010000101001010001001010101001000111101011111001101"
"1011011111111000001111111001010101111011100101110110001011011000101000010101101100000110011110100000010100110111100111111011011110001000110100111100100"
"1110001110001111110101011110010010011011001011001000001010000010000110101010101011111110110010000010000111000010000011011110001111111001000010000000111"
@@ -3288,7 +5196,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1000000100011011110011111011110000011111110111001111111010110101100011000111010100100010001111000101110110110100000111000011101011011101111111000011111"
"1000110110001001001111110010011100000100011010101101101101101001001001011110101010011110010011011110100111100111110111111110000101100111110000101010011"
},
- /* 99*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 36, -1, { 0, 0, "" }, "Lorem ipsum dolor sit amet.", -1, 0, 151, 151, 1, 1, "Same as above",
+ /*165*/ { BARCODE_AZTEC, UNICODE_MODE | FAST_MODE, -1, -1, -1, 36, -1, { 0, 0, "" }, "Lorem ipsum dolor sit amet.", -1, 0, 151, 151, 1, 1, "Same as above",
"0110011000001101111010100010010110101010100001110111111001101101010000111100111111111001000011100001010000101001010001001010101001000111101011111001101"
"1011011111111000001111111001010101111011100101110110001011011000101000010101101100000110011110100000010100110111100111111011011110001000110100111100100"
"1110001110001111110101011110010010011011001011001000001010000010000110101010101011111110110010000010000111000010000011011110001111111001000010000000111"
@@ -3441,7 +5349,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1000000100011011110011111011110000011111110111001111111010110101100011000111010100100010001111000101110110110100000111000011101011011101111111000011111"
"1000110110001001001111110010011100000100011010101101101101101001001001011110101010011110010011011110100111100111110111111110000101100111110000101010011"
},
- /*100*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 31, -1, { 0, 0, "" }, "aztec barcode", -1, 0, 131, 131, 1, 1, "Layers 27 example from Andre Maute, mailing list 2020-12-16",
+ /*166*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 31, -1, { 0, 0, "" }, "aztec barcode", -1, 0, 131, 131, 1, 1, "Layers 27 example from Andre Maute, mailing list 2020-12-16",
"10101111100010101000001110000100001111111110110110010011000100100000011000101001100000001111111010100010010101111010001011001110001"
"01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
"10001110111111000001001111011100100100010011110010101011110111111000000110101100000110101010110000010101101110010010010101001001001"
@@ -3574,7 +5482,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
"10111010011101110010010111100011101001001011100010101101110000011000110101000011100000011000101000101010001110100000000100101100001"
},
- /*101*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 31, -1, { 0, 0, "" }, "aztec barcode", -1, 0, 131, 131, 1, 1, "Same as above",
+ /*167*/ { BARCODE_AZTEC, DATA_MODE | FAST_MODE, -1, -1, -1, 31, -1, { 0, 0, "" }, "aztec barcode", -1, 0, 131, 131, 1, 1, "Same as above",
"10101111100010101000001110000100001111111110110110010011000100100000011000101001100000001111111010100010010101111010001011001110001"
"01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
"10001110111111000001001111011100100100010011110010101011110111111000000110101100000110101010110000010101101110010010010101001001001"
@@ -3707,7 +5615,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
"10111010011101110010010111100011101001001011100010101101110000011000110101000011100000011000101000101010001110100000000100101100001"
},
- /*102*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 6, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 23, 23, 1, 1, "Full 2 layers example",
+ /*168*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 6, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 23, 23, 1, 1, "Full 2 layers example",
"00000100110001011110010"
"01111011110100100101111"
"00001011010000010011001"
@@ -3732,7 +5640,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11001100111110110000000"
"00011010100010111001011"
},
- /*103*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 7, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", -1, 0, 27, 27, 1, 1, "Full 3 layers example",
+ /*169*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 7, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", -1, 0, 27, 27, 1, 1, "Full 3 layers example",
"001011111011101010010010000"
"011111001111111001111010110"
"001111101101101100001011101"
@@ -3761,7 +5669,7 @@ static void test_encode(const testCtx *const p_ctx) {
"110011110110011010110100110"
"101010010111000001000111010"
},
- /*104*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 8, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNO", -1, 0, 31, 31, 1, 1, "Full 4 layers example",
+ /*170*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 8, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNO", -1, 0, 31, 31, 1, 1, "Full 4 layers example",
"0011101110100110101001010110000"
"0110000101110011101111001100111"
"0000011000110010000001101101001"
@@ -3794,7 +5702,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1111011001010111010011101111110"
"1001011100001000011100011001100"
},
- /*105*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 9, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 37, 37, 1, 1, "5 layers example",
+ /*171*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 9, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 37, 37, 1, 1, "5 layers example",
"0010010100110011001011100010000111101"
"0101111010111110110100101101010011001"
"1010101010101010101010101010101010101"
@@ -3833,7 +5741,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0101001010110100110101111101011110000"
"0111100001000111001011001100101001111"
},
- /*106*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 12, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 49, 49, 1, 1, "8 layers example",
+ /*172*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 12, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 49, 49, 1, 1, "8 layers example",
"0001000111011100100000001101000011110011100000101"
"0110100001000100011100000000110110101100010111110"
"0000011110010100101100001010000010000100110110111"
@@ -3884,7 +5792,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1001110101111010111101010001000110101110000111011"
"1110001110011001010011001001010000100100101000001"
},
- /*107*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 14, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 57, 57, 1, 1, "10 layers example",
+ /*173*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 14, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 57, 57, 1, 1, "10 layers example",
"001011000011100111111010110111010001110110001110011100010"
"011110001010001111111111000000100000100100110001001011111"
"000101001001111111010111010010011011111011101011010110010"
@@ -3943,7 +5851,7 @@ static void test_encode(const testCtx *const p_ctx) {
"111101011110010100100011010101100011100110010111011001001"
"001100101001110000101000010011000100001101011001011100010"
},
- /*108*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 16, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 67, 67, 1, 1, "12 layers example",
+ /*174*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 16, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 67, 67, 1, 1, "12 layers example",
"0000000100001010000100101101101010101011010000001010001111010001101"
"0101010101010101010101010101010101010101010101010101010101010101010"
"0001010100101010100010110000101110111100001101110000000100111010001"
@@ -4012,7 +5920,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0101010101010101010101010101010101010101010101010101010101010101010"
"0001010011000010100000100100010000011010100101110000010001110001101"
},
- /*109*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 17, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 71, 71, 1, 1, "13 layers example",
+ /*175*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 17, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 71, 71, 1, 1, "13 layers example",
"00001101010011011010101011001110001000011100011011001100101000001110111"
"01110010110000100111001011100101010101000111011001110000100101100001100"
"00000111000100010100111110101011100011011010001110001000101100010000011"
@@ -4085,7 +5993,7 @@ static void test_encode(const testCtx *const p_ctx) {
"10110010001101011101001110011001111101100101011010011110111110101111111"
"10000010100001001000010000110101001001110000100011100001100110010100001"
},
- /*110*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 20, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 83, 83, 1, 1, "16 layers example",
+ /*176*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 20, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 83, 83, 1, 1, "16 layers example",
"00001011100001101001010010111011000000000010110111001100101011111010100110010011011"
"00001100111101010101111001100010000000000101110110000101011100011010011001001000011"
"00000001101101111000000010100101011010101011110011000000000101010100111000110101100"
@@ -4170,7 +6078,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01101011110001110011001111101100101011010101110111110101111101011001011101100001111"
"00001001000010000110101000101110000100011010001100110010100011011111011100001101110"
},
- /*111*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 23, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 95, 95, 1, 1, "19 layers example",
+ /*177*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 23, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 95, 95, 1, 1, "19 layers example",
"00010001011000001001011100000100010100011110001000101101010001101011000110101100111011100100000"
"00111000100000010000111101010111001010100110100100101001100010111101100100110001001101001001000"
"00110000001000100010001011100100111100110000000000111101000101101101011010001100100111011100010"
@@ -4267,7 +6175,7 @@ static void test_encode(const testCtx *const p_ctx) {
"10011001111011010101011010011101111110101111010101011110010010111111000001000011100100110011001"
"00110101001011100000100011100010100110010100111000001111111101000000001100011000110110100110000"
},
- /*112*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 24, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 101, 101, 1, 1, "20 layers example",
+ /*178*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 24, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 101, 101, 1, 1, "20 layers example",
"00100011001001111011101000010101101000001111011011100001010111001110100001111011101010011110100110110"
"01001011101010010001000100010011010011001011100001000010011001000001100110100110000010001111010101011"
"10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
@@ -4370,7 +6278,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01011101100101011001001110111110100111101011010110010100101110001100000100001110000011101010010100001"
"01100101110000100011110001100110011010011000001110100010010101000111010001001111111100001101100010111"
},
- /*113*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 30, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 125, 125, 1, 1, "26 layers example",
+ /*179*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 30, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 125, 125, 1, 1, "26 layers example",
"00100110111101111000100011101010001011000100011001100001000110110101101111011010100110010101111010000000001001111011011101111"
"01000110110001010011111011000100001101000010100100110101101011001111101101110000100110101000000100001011010101000110110110011"
"00100000111011111011100111001111100011001111101001011011011111100001111010110111111101111111011010001000100011110110101111001"
@@ -4497,41 +6405,41 @@ static void test_encode(const testCtx *const p_ctx) {
"11111010111101011001001001001000000000110100010101011110101011001010101011000101010010100111110010111001110100001111110111011"
"10011001010011111111011111100010010011110010001010100100000110100111000110011010110111001010011011101001111100110010110010011"
},
- /*114*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, -1, -1, { 1, 2, "" }, "[20]01", -1, 0, 15, 15, 1, 1, "GS1 with Structured Append",
- "001101011010101"
- "111100100000010"
- "101100001000101"
- "111111111111110"
+ /*180*/ { BARCODE_AZTEC, GS1_MODE, 0, -1, -1, -1, -1, { 1, 2, "" }, "[20]01", -1, 0, 15, 15, 1, 1, "GS1 with Structured Append",
+ "000101100111111"
+ "111010110110110"
+ "101100001000110"
+ "111111111111101"
"111100000001101"
"010101111101101"
- "000101000101100"
- "011101010101010"
- "001101000101011"
+ "000101000101110"
+ "011101010101011"
+ "001101000101010"
"000101111101001"
"110100000001001"
- "000111111111111"
- "000001100010011"
- "001001100010110"
- "000001101000000"
+ "110111111111111"
+ "100001100010011"
+ "000001000010110"
+ "100000001000000"
},
- /*115*/ { BARCODE_AZTEC, GS1_MODE | FAST_MODE, -1, -1, -1, -1, -1, { 1, 2, "" }, "[20]01", -1, 0, 15, 15, 1, 1, "Same as above",
- "001101011010101"
- "111100100000010"
- "101100001000101"
- "111111111111110"
+ /*181*/ { BARCODE_AZTEC, GS1_MODE | FAST_MODE, 0, -1, -1, -1, -1, { 1, 2, "" }, "[20]01", -1, 0, 15, 15, 1, 1, "Same as above",
+ "000101100111111"
+ "111010110110110"
+ "101100001000110"
+ "111111111111101"
"111100000001101"
"010101111101101"
- "000101000101100"
- "011101010101010"
- "001101000101011"
+ "000101000101110"
+ "011101010101011"
+ "001101000101010"
"000101111101001"
"110100000001001"
- "000111111111111"
- "000001100010011"
- "001001100010110"
- "000001101000000"
+ "110111111111111"
+ "100001100010011"
+ "000001000010110"
+ "100000001000000"
},
- /*116*/ { BARCODE_AZTEC, GS1_MODE, 3, -1, -1, -1, -1, { 3, 3, "AZ1" }, "[20]01", -1, 0, 19, 19, 1, 1, "GS1 with Structured Append, ECI",
+ /*182*/ { BARCODE_AZTEC, GS1_MODE, 3, -1, -1, -1, -1, { 3, 3, "AZ1" }, "[20]01", -1, 0, 19, 19, 1, 1, "GS1 with Structured Append, ECI",
"1101011001100100101"
"1000001000001010100"
"1100010010010100100"
@@ -4552,7 +6460,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0011010000001001010"
"1011000010000000000"
},
- /*117*/ { BARCODE_AZTEC, GS1_MODE | FAST_MODE, 3, -1, -1, -1, -1, { 3, 3, "AZ1" }, "[20]01", -1, 0, 19, 19, 1, 1, "Same as above",
+ /*183*/ { BARCODE_AZTEC, GS1_MODE | FAST_MODE, 3, -1, -1, -1, -1, { 3, 3, "AZ1" }, "[20]01", -1, 0, 19, 19, 1, 1, "Same as above",
"1101011001100100101"
"1000001000001010100"
"1100010010010100100"
@@ -4573,57 +6481,57 @@ static void test_encode(const testCtx *const p_ctx) {
"0011010000001001010"
"1011000010000000000"
},
- /*118*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, 6, -1, { 2, 4, { '1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2' } }, "[01]12345678901231[10]01", -1, ZINT_WARN_NONCOMPLIANT, 23, 23, 1, 1, "GS1 with Structured Append, full symbol",
+ /*184*/ { BARCODE_AZTEC, GS1_MODE, 0, -1, -1, 6, -1, { 2, 4, { '1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2' } }, "[01]12345678901231[10]01", -1, ZINT_WARN_NONCOMPLIANT, 23, 23, 1, 1, "GS1 with Structured Append, full symbol",
"11100110011000010001000"
"10100110000110101111010"
- "11000101100000111000011"
- "11100111110100011101011"
- "01101100001000000011000"
- "11001111111111111110111"
- "11001100000000000111001"
- "00001101111111110100101"
- "00011101000000010111000"
- "10000101011111010110101"
- "01001101010001010100101"
+ "11001110000000001101011"
+ "11101110000111101100011"
+ "01111100001000000010100"
+ "11111111111111111110011"
+ "11101100000000000111101"
+ "00000101111111110100001"
+ "00001101000000010111100"
+ "10000101011111010100001"
+ "01000101010001010111001"
"01010101010101010101010"
- "10010101010001010100010"
- "10111101011111010110100"
- "00110101000000010110110"
- "10001101111111110101001"
- "10010100000000000100010"
- "11000111111111111111010"
- "00010000010000000000110"
- "11010000010111010111011"
- "11101101110011000101000"
+ "10011101010001010111010"
+ "10001101011111010110000"
+ "00000101000000010101010"
+ "10011101111111110111101"
+ "10101100000000000100010"
+ "11000111111111111110110"
+ "00110000110010101000010"
+ "11011011101110001001111"
+ "11010000010011010110100"
"01011110101100000101110"
"00010001000011011101100"
},
- /*119*/ { BARCODE_AZTEC, GS1_MODE | FAST_MODE, -1, -1, -1, 6, -1, { 2, 4, { '1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2' } }, "[01]12345678901231[10]01", -1, ZINT_WARN_NONCOMPLIANT, 23, 23, 1, 1, "Same as above",
+ /*185*/ { BARCODE_AZTEC, GS1_MODE | FAST_MODE, 0, -1, -1, 6, -1, { 2, 4, { '1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2' } }, "[01]12345678901231[10]01", -1, ZINT_WARN_NONCOMPLIANT, 23, 23, 1, 1, "Same as above",
"11100110011000010001000"
"10100110000110101111010"
- "11000101100000111000011"
- "11100111110100011101011"
- "01101100001000000011000"
- "11001111111111111110111"
- "11001100000000000111001"
- "00001101111111110100101"
- "00011101000000010111000"
- "10000101011111010110101"
- "01001101010001010100101"
+ "11001110000000001101011"
+ "11101110000111101100011"
+ "01111100001000000010100"
+ "11111111111111111110011"
+ "11101100000000000111101"
+ "00000101111111110100001"
+ "00001101000000010111100"
+ "10000101011111010100001"
+ "01000101010001010111001"
"01010101010101010101010"
- "10010101010001010100010"
- "10111101011111010110100"
- "00110101000000010110110"
- "10001101111111110101001"
- "10010100000000000100010"
- "11000111111111111111010"
- "00010000010000000000110"
- "11010000010111010111011"
- "11101101110011000101000"
+ "10011101010001010111010"
+ "10001101011111010110000"
+ "00000101000000010101010"
+ "10011101111111110111101"
+ "10101100000000000100010"
+ "11000111111111111110110"
+ "00110000110010101000010"
+ "11011011101110001001111"
+ "11010000010011010110100"
"01011110101100000101110"
"00010001000011011101100"
},
- /*120*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "j>\350\255\362\357\027\231: S\224\237\303\035\207", -1, 0, 19, 19, 1, 899, "BWIP-JS #354 1st example",
+ /*186*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "j>\350\255\362\357\027\231: S\224\237\303\035\207", -1, 0, 19, 19, 1, 899, "BWIP-JS #354 1st example",
"1101010010011101000"
"1100111010011110011"
"1001101000000110101"
@@ -4644,7 +6552,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110110001011011110"
"0001111011111000101"
},
- /*121*/ { BARCODE_AZTEC, FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "j>\350\255\362\357\027\231: S\224\237\303\035\207", -1, 0, 19, 19, 0, 899, "BWIP-JS #354 1st example; BWIPP different encodation, 3 codewords shorter (see above)",
+ /*187*/ { BARCODE_AZTEC, FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "j>\350\255\362\357\027\231: S\224\237\303\035\207", -1, 0, 19, 19, 0, 899, "BWIP-JS #354 1st example; BWIPP different encodation, 3 codewords shorter (see above)",
"1111001111001101001"
"1011001011010001101"
"0010010101011000011"
@@ -4665,7 +6573,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0000111100101101101"
"1011101101111100011"
},
- /*122*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\035\316\244. D\004\275\031}\244\311\030\035>t", -1, 0, 19, 19, 1, 899, "BWIP-JS #354 2nd example",
+ /*188*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\035\316\244. D\004\275\031}\244\311\030\035>t", -1, 0, 19, 19, 1, 899, "BWIP-JS #354 2nd example",
"1110110111000100010"
"1110111001100010100"
"1010011100101001011"
@@ -4686,7 +6594,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0111010000000000111"
"0001000001010001010"
},
- /*123*/ { BARCODE_AZTEC, FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\035\316\244. D\004\275\031}\244\311\030\035>t", -1, 0, 19, 19, 0, 899, "BWIP-JS #354 2nd example; BWIPP different encodation",
+ /*189*/ { BARCODE_AZTEC, FAST_MODE, -1, -1, -1, 2, -1, { 0, 0, "" }, "\035\316\244. D\004\275\031}\244\311\030\035>t", -1, 0, 19, 19, 0, 899, "BWIP-JS #354 2nd example; BWIPP same as above",
"1110001010011101111"
"1001010010100100110"
"1100010011111011111"
@@ -4707,7 +6615,7 @@ static void test_encode(const testCtx *const p_ctx) {
"0001011110011100101"
"0000001100111001111"
},
- /*124*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "0", -1, 0, 11, 11, 1, 1, "ISO/IEC 24778:2008 Figure A.1 (1st)",
+ /*190*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "0", -1, 0, 11, 11, 1, 1, "ISO/IEC 24778:2008 Figure A.1 (1st)",
"11101010101"
"11111111111"
"01000000010"
@@ -4720,7 +6628,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00101010100"
},
- /*125*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "25", -1, 0, 11, 11, 1, 1, "ISO/IEC 24778:2008 Figure A.1 (2nd)",
+ /*191*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "25", -1, 0, 11, 11, 1, 1, "ISO/IEC 24778:2008 Figure A.1 (2nd)",
"11101100101"
"11111111111"
"01000000011"
@@ -4733,7 +6641,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00100100000"
},
- /*126*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "125", -1, 0, 11, 11, 1, 1, "ISO/IEC 24778:2008 Figure A.1 (3rd)",
+ /*192*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "125", -1, 0, 11, 11, 1, 1, "ISO/IEC 24778:2008 Figure A.1 (3rd)",
"11110101101"
"11111111111"
"11000000011"
@@ -4746,7 +6654,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00111101000"
},
- /*127*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "255", -1, 0, 11, 11, 1, 1, "ISO/IEC 24778:2008 Figure A.1 (4th)",
+ /*193*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "255", -1, 0, 11, 11, 1, 1, "ISO/IEC 24778:2008 Figure A.1 (4th)",
"11010101001"
"11111111111"
"01000000011"
@@ -4759,7 +6667,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00110011100"
},
- /*128*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "1", -1, 0, 11, 11, 1, 1, "",
+ /*194*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "1", -1, 0, 11, 11, 1, 1, "",
"11101010101"
"11111111111"
"11000000011"
@@ -4772,7 +6680,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00100110100"
},
- /*129*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "15", -1, 0, 11, 11, 1, 1, "",
+ /*195*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "15", -1, 0, 11, 11, 1, 1, "",
"11101001001"
"11111111111"
"11000000011"
@@ -4785,7 +6693,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00001111100"
},
- /*130*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "16", -1, 0, 11, 11, 1, 1, "",
+ /*196*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "16", -1, 0, 11, 11, 1, 1, "",
"11101110101"
"11111111111"
"11000000010"
@@ -4798,7 +6706,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00111100100"
},
- /*131*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "63", -1, 0, 11, 11, 1, 1, "",
+ /*197*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "63", -1, 0, 11, 11, 1, 1, "",
"11100101001"
"11111111111"
"11000000011"
@@ -4811,7 +6719,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00101010000"
},
- /*132*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "64", -1, 0, 11, 11, 1, 1, "",
+ /*198*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "64", -1, 0, 11, 11, 1, 1, "",
"11111010101"
"11111111111"
"01000000010"
@@ -4824,7 +6732,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00111011100"
},
- /*133*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "65", -1, 0, 11, 11, 1, 1, "",
+ /*199*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "65", -1, 0, 11, 11, 1, 1, "",
"11111010101"
"11111111111"
"11000000011"
@@ -4837,7 +6745,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00110111100"
},
- /*134*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "126", -1, 0, 11, 11, 1, 1, "",
+ /*200*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "126", -1, 0, 11, 11, 1, 1, "",
"11110101001"
"11111111111"
"01000000010"
@@ -4850,7 +6758,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00110111000"
},
- /*135*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "127", -1, 0, 11, 11, 1, 1, "",
+ /*201*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "127", -1, 0, 11, 11, 1, 1, "",
"11110101001"
"11111111111"
"11000000011"
@@ -4863,7 +6771,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00111011000"
},
- /*136*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "128", -1, 0, 11, 11, 1, 1, "",
+ /*202*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "128", -1, 0, 11, 11, 1, 1, "",
"11001010101"
"11111111111"
"11000000010"
@@ -4876,7 +6784,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00100010000"
},
- /*137*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "191", -1, 0, 11, 11, 1, 1, "",
+ /*203*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "191", -1, 0, 11, 11, 1, 1, "",
"11000101001"
"11111111111"
"01000000011"
@@ -4889,7 +6797,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00100010100"
},
- /*138*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "192", -1, 0, 11, 11, 1, 1, "",
+ /*204*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "192", -1, 0, 11, 11, 1, 1, "",
"11011010101"
"11111111111"
"11000000010"
@@ -4902,7 +6810,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00110011000"
},
- /*139*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "225", -1, 0, 11, 11, 1, 1, "",
+ /*205*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "225", -1, 0, 11, 11, 1, 1, "",
"11010010101"
"11111111111"
"11000000011"
@@ -4915,7 +6823,7 @@ static void test_encode(const testCtx *const p_ctx) {
"01111111111"
"00001100100"
},
- /*140*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "254", -1, 0, 11, 11, 1, 1, "",
+ /*206*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, -1, { 0, 0, "" }, "254", -1, 0, 11, 11, 1, 1, "",
"11010101001"
"11111111111"
"11000000010"
@@ -4964,7 +6872,7 @@ static void test_encode(const testCtx *const p_ctx) {
if (p_ctx->generate) {
printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %s, { %d, %d, \"%.32s\" }, \"%s\", %d,"
" %s, %d, %d, %d, %d, \"%s\",\n",
- i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].eci,
+ i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), symbol->eci,
testUtilOutputOptionsName(data[i].output_options), data[i].option_1, data[i].option_2,
testUtilOption3Name(data[i].symbology, data[i].option_3),
data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
@@ -5202,7 +7110,7 @@ static void test_encode_segs(const testCtx *const p_ctx) {
"1000001011111001010"
"0100000000011100111"
},
- /* 8*/ { UNICODE_MODE, -1, -1, -1, -1, { { 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, 49, 49, 0, "AIM ITS/04-023:2022 Annex A example; BWIPP different encodation, same no. of codewords",
+ /* 8*/ { UNICODE_MODE, -1, -1, -1, -1, { { 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, 49, 49, 0, "AIM ITS/04-023:2022 Annex A example; BWIPP different encodation, same no. of codewords (only placement of L/L differs)",
"0010101110000010101011011001100001001001100001010"
"0010100001100010000000110000110010000000010010001"
"0001110011100101000100111100111110001111101010101"
@@ -5547,38 +7455,38 @@ static void test_encode_segs(const testCtx *const p_ctx) {
"00000000010011100110111"
},
/* 20*/ { GS1_MODE, -1, -1, -1, -1, { { TU("[20]01"), -1, 0 }, { TU(""), 0, 0 }, { TU(""), 0, 0 } }, 0, 15, 15, 1, "GS1 with single seg ok",
- "000100111011111"
- "000101001110001"
- "001100000100110"
- "011111111111111"
+ "000111011110100"
+ "111001101011110"
+ "111100000100100"
+ "001111111111111"
"001100000001110"
- "000101111101000"
+ "000101111101010"
"011101000101000"
"000101010101001"
- "010101000101100"
- "111101111101010"
- "100100000001100"
- "010111111111110"
- "000011011110011"
- "000001100010000"
- "010101010100011"
+ "000101000101101"
+ "011101111101001"
+ "000100000001111"
+ "100111111111111"
+ "000011011110000"
+ "101011011010111"
+ "000001100110010"
},
/* 21*/ { GS1_MODE | FAST_MODE, -1, -1, -1, -1, { { TU("[20]01"), -1, 0 }, { TU(""), 0, 0 }, { TU(""), 0, 0 } }, 0, 15, 15, 1, "Same as above",
- "000100111011111"
- "000101001110001"
- "001100000100110"
- "011111111111111"
+ "000111011110100"
+ "111001101011110"
+ "111100000100100"
+ "001111111111111"
"001100000001110"
- "000101111101000"
+ "000101111101010"
"011101000101000"
"000101010101001"
- "010101000101100"
- "111101111101010"
- "100100000001100"
- "010111111111110"
- "000011011110011"
- "000001100010000"
- "010101010100011"
+ "000101000101101"
+ "011101111101001"
+ "000100000001111"
+ "100111111111111"
+ "000011011110000"
+ "101011011010111"
+ "000001100110010"
},
};
const int data_size = ARRAY_SIZE(data);
@@ -6729,6 +8637,8 @@ int main(int argc, char *argv[]) {
testFunction funcs[] = { /* name, func */
{ "test_large", test_large },
+ { "test_bs", test_bs },
+ { "test_many_states", test_many_states },
{ "test_options", test_options },
{ "test_encode", test_encode },
{ "test_encode_segs", test_encode_segs },
diff --git a/backend/tests/test_dotcode.c b/backend/tests/test_dotcode.c
index 66950f78..b630fdd5 100644
--- a/backend/tests/test_dotcode.c
+++ b/backend/tests/test_dotcode.c
@@ -52,7 +52,7 @@ static void test_large(const testCtx *const p_ctx) {
/* 3*/ { 200, '0', 2974, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '203' is too large (maximum 200)", 1, 1, "" }, /* Width > 200 also */
/* 4*/ { 200, 'A', 1470, 0, "", 1, 1, "" },
/* 5*/ { 200, 'A', 1471, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '201' is too large (maximum 200)", 1, 1, "" },
- /* 6*/ { 200, '\240', 1225, 0, "", 1, 899, "" },
+ /* 6*/ { 200, '\240', 1225, 0, "", 0, 899, "BWIPP limit now 4000 (== 1000 with caret escaping) TODO: suggest change to BWIPP" },
/* 7*/ { 200, '\240', 1226, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '201' is too large (maximum 200)", 1, 899, "" },
/* 8*/ { 200, '0', 1, 0, "", 1, 1, "" }, /* Padding codewords 35 - probably max */
/* 9*/ { 200, '0', 2, 0, "", 1, 1, "" }, /* Padding codewords 35 */
diff --git a/backend/tests/test_mailmark.c b/backend/tests/test_mailmark.c
index d58bd23e..2160fd09 100644
--- a/backend/tests/test_mailmark.c
+++ b/backend/tests/test_mailmark.c
@@ -642,6 +642,40 @@ static void test_2d_encode(const testCtx *const p_ctx) {
"10111101100000001010110001010110"
"11111111111111111111111111111111"
},
+ /* 6*/ { 10, "JGB 010100000700009001B707RH1A 0SN35XX é", 0, 32, 32, 1, "",
+ "10101010101010101010101010101010"
+ "11000001010001111001101100001111"
+ "10100101110000101011111110000000"
+ "10101000010110011001101011000101"
+ "10001100111000101111000111011110"
+ "10011100011000011100101000100101"
+ "11001111001000101010010010011110"
+ "10100101011000111100001100101111"
+ "10101111010111101100111100110100"
+ "11001001100100111001110000010111"
+ "11001000001001001101001111011110"
+ "11010000001111111011011101101101"
+ "11001000010000101001101010011010"
+ "11010111000101011111111101111111"
+ "10111101100011101110001100110100"
+ "11111111111111111111111111111111"
+ "10101010101010101010101010101010"
+ "11011101100000011000000001110001"
+ "11110000111100101000011000101010"
+ "11001011110010011000011101110001"
+ "11011111000101001011100101011100"
+ "10010101101100011100010000011101"
+ "10011001101011101110100111101000"
+ "11101010110010111001111100100101"
+ "10011011111101001000101111110100"
+ "10011101010101111111111000111101"
+ "11100001010010101011001010000000"
+ "10011010101011111000011010001001"
+ "11101001100100001101010001011000"
+ "10001001100100011011110101100101"
+ "11001011100001001010111101010100"
+ "11111111111111111111111111111111"
+ },
};
const int data_size = ARRAY_SIZE(data);
int i, length, ret;
@@ -714,7 +748,7 @@ static void test_2d_encode(const testCtx *const p_ctx) {
char modules_dump[144 * 144 + 1];
assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1,
"i:%d testUtilModulesDump == -1\n", i);
- ret = testUtilZXingCPP(i, symbol, data[i].data, length, modules_dump, 1 /*zxingcpp_cmp*/, cmp_buf,
+ ret = testUtilZXingCPP(i, symbol, data[i].data, length, modules_dump, 3 /*zxingcpp_cmp*/, cmp_buf,
sizeof(cmp_buf), &cmp_len);
assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n",
i, testUtilBarcodeName(symbol->symbology), ret);
diff --git a/backend/tests/testcommon.c b/backend/tests/testcommon.c
index bc6d00d7..42e7095b 100644
--- a/backend/tests/testcommon.c
+++ b/backend/tests/testcommon.c
@@ -4118,9 +4118,9 @@ static const char *testUtilZXingCPPCharSet(int eci) {
/* Run "zxingcppdecoder", returning result in `buffer` */
int testUtilZXingCPP(int index, struct zint_symbol *symbol, const char *source, const int length, const char *bits,
const int zxingcpp_cmp, char *buffer, const int buffer_size, int *p_cmp_len) {
- static const char cmd_fmt[] = "zxingcppdecoder -textonly -format %s -width %d -bits '%s'";
- static const char opts_cmd_fmt[] = "zxingcppdecoder -textonly -format %s -opts '%s' -width %d -bits '%s'";
- static const char cs_cmd_fmt[] = "zxingcppdecoder -textonly -format %s -charset %s -width %d -bits '%s'";
+ static const char cmd_fmt[] = "zxingcppdecoder -textonly -format %s -width %d -bits %s";
+ static const char opts_cmd_fmt[] = "zxingcppdecoder -textonly -format %s -opts '%s' -width %d -bits %s";
+ static const char cs_cmd_fmt[] = "zxingcppdecoder -textonly -format %s -charset %s -width %d -bits %s";
const int bits_len = (int) strlen(bits);
const int width = symbol->width;
diff --git a/backend/tests/testcommon.h b/backend/tests/testcommon.h
index a8e23d09..8ec16eb2 100644
--- a/backend/tests/testcommon.h
+++ b/backend/tests/testcommon.h
@@ -48,6 +48,7 @@ extern "C" {
#define ZINT_DEBUG_TEST_PERFORMANCE 256
#define ZINT_DEBUG_TEST_ZXINGCPP 512
#define ZINT_DEBUG_TEST_BWIPP_ZXINGCPP 1024
+#define ZINT_DEBUG_TEST_AZTEC_SKIP_ALL 2048
#ifdef ZINT_SANITIZEM /* Suppress clang -fsanitize=memory false positives */
#define ZINT_TESTUTIL_SANITIZEM_INIT = {0}
diff --git a/backend/tests/tools/bwipp_dump.ps.tar.xz b/backend/tests/tools/bwipp_dump.ps.tar.xz
index 2ca128fc..530a05e6 100644
Binary files a/backend/tests/tools/bwipp_dump.ps.tar.xz and b/backend/tests/tools/bwipp_dump.ps.tar.xz differ
diff --git a/backend/tests/tools/run_zxingcpp_tests.sh b/backend/tests/tools/run_zxingcpp_tests.sh
index 86bdaf99..cb955972 100755
--- a/backend/tests/tools/run_zxingcpp_tests.sh
+++ b/backend/tests/tools/run_zxingcpp_tests.sh
@@ -16,6 +16,8 @@ function run_zxingcpp_test() {
run_zxingcpp_test "test_2of5" "encode"
run_zxingcpp_test "test_aztec" "large"
+run_zxingcpp_test "test_aztec" "bs"
+run_zxingcpp_test "test_aztec" "many_states"
run_zxingcpp_test "test_aztec" "encode"
run_zxingcpp_test "test_aztec" "encode_segs"
run_zxingcpp_test "test_aztec" "fuzz"
diff --git a/docs/README b/docs/README
index ba5c9bf0..09531081 100644
--- a/docs/README
+++ b/docs/README
@@ -1,12 +1,12 @@
-% docs/README 2025-12-09
+% docs/README 2026-03-11
For generation of "docs/manual.html", "docs/manual.pdf" and "docs/manual.txt" from "manual.pmd"
and man page "docs/zint.1" from "docs/zint.1.pmd" using pandoc >= 3.8.2.
On Ubuntu/Debian (tested on Ubuntu 22.04 and Ubuntu 24.04)
- wget https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-1-amd64.deb
- sudo dpkg -i pandoc-3.8.3-1-amd64.deb
+ wget https://github.com/jgm/pandoc/releases/download/3.9/pandoc-3.9-1-amd64.deb
+ sudo dpkg -i pandoc-3.9-1-amd64.deb
sudo apt install librsvg2-bin
sudo apt install texlive-xetex
sudo apt install texlive-lang-cjk
@@ -15,9 +15,9 @@ On Ubuntu/Debian (tested on Ubuntu 22.04 and Ubuntu 24.04)
On Fedora (tested on Fedora Linux 38 (Workstation Edition) and Fedora Linux 42 (Workstation Edition))
- wget https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-linux-amd64.tar.gz
- tar xf pandoc-3.8.3-linux-amd64.tar.gz
- sudo mv -i pandoc-3.8.3/bin/pandoc /usr/local/bin
+ wget https://github.com/jgm/pandoc/releases/download/3.9/pandoc-3.9-linux-amd64.tar.gz
+ tar xf pandoc-3.9-linux-amd64.tar.gz
+ sudo mv -i pandoc-3.9/bin/pandoc /usr/local/bin
sudo dnf install librsvg2-tools.x86_64
sudo dnf install texlive-xetex
sudo dnf install texlive-ctex.noarch
diff --git a/docs/manual.html b/docs/manual.html
index a9d74a33..4b35e6af 100644
--- a/docs/manual.html
+++ b/docs/manual.html
@@ -334,7 +334,7 @@
Zint Barcode Generator and Zint Barcode Studio User
Manual
Version 2.16.0.9
-February 2026
+March 2026
@@ -2601,13 +2601,12 @@ Modes and ECI below.
GS1 data can be encoded in a number of symbologies - see 4.11.3 GS1 Data Entry and
Options .
-Health Industry Barcode (HIBC) data may also be encoded in the
-symbologies Aztec Code, Codablock-F, Code 128, Code 39, Data Matrix,
-MicroPDF417, PDF417 and QR Code. Within this mode, the leading
-'+' and the check character are automatically added by
-Zint, conforming to HIBC Labeler Identification Code (HIBC LIC). For
-HIBC Provider Applications Standard (HIBC PAS), preface the data with a
-slash '/'.
+Health Industry Barcode (HIBC) data may be encoded in the symbologies
+Aztec Code, Codablock-F, Code 128, Code 39, Data Matrix, MicroPDF417,
+PDF417 and QR Code. Within this mode, the leading '+' and
+the check character are automatically added by Zint, conforming to HIBC
+Labeler Identification Code (HIBC LIC). For HIBC Provider Applications
+Standard (HIBC PAS), preface the data with a slash '/'.
The --binary option encodes the input data as given.
Automatic code page translation to an ECI page is disabled, and no
validation of the data’s encoding takes place. This may be used for raw
@@ -4240,9 +4239,9 @@ as per-row rather than as overall height.
FAST_MODE
Use faster if less optimal encodation or
-other shortcuts if available (affects DATAMATRIX,
-MICROPDF417, PDF417, QRCODE and
-UPNQR only).
+other shortcuts if available (affects AZTEC,
+DATAMATRIX, MICROPDF417, PDF417,
+QRCODE and UPNQR only).
EXTRA_ESCAPE_MODE
@@ -4297,8 +4296,8 @@ in section 4.4 Adjusting Height . The
height member should be set to the desired per-row value on
input (it will be set to the overall height on output).
FAST_MODE causes a less optimal encodation scheme to be
-used for Data Matrix, MicroPDF417 and PDF417. For QR Code and UPNQR, it
-limits Zint’s automatic mask selection - see 6.6.3 QR Code (ISO 18004) for details.
5.12 Multiple Segments
For input data requiring multiple ECIs, the following functions may
@@ -5890,8 +5889,9 @@ or 3 for CC-A, CC-B or CC-C respectively.
into a small space. The size of the 2D component and the amount of error
correction is determined by the amount of data to be encoded and the
type of linear component which is being used. CC-A can encode up to 56
-numeric digits or an alphanumeric string of shorter length. To select
-CC-A use --mode=1 (API option_1 = 1).
+numeric digits (including AIs) or an alphanumeric string of shorter
+length (e.g. if all capitals, at most 30, excluding AI). To select CC-A
+use --mode=1 (API option_1 = 1).
@@ -9946,9 +9946,10 @@ of any AI (except when the last) apart from those whose
11, 12, 13, 15, 16, 17, 20, 31, 32, 33, 34, 35, 36 and 41, as specified
in GS1 General Specifications 26.0 Table 7-6 “Element strings with
predefined length using GS1 Application Identifiers”. Note that this
-applies even to AIs with fixed lengths, so e.g. the data for AI 3940
-must have a terminating FNC1 (except when the last AI).
+applies even to AIs with fixed lengths, so e.g. the data for AI 3940,
+which has a fixed length of 4, must have a terminating FNC1
+(except when the last AI).
BARCODE_MEMORY_FILE textual formats EPS and SVG will
have Unix newlines (LF) on both Windows and Unix, i.e. not CR+LF on
Windows.