mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-29 14:25:23 -04:00
CODE128: Add minimal encodation algorithm (non-extended ASCII only)
from ZXing (props Alex Geller) - about 25-60% slower depending on data & stack heavy but does improve some outcomes when FNC1s present (GS1_MODE or manual) although not much else it appears (the previous algorithm was very good), but has a logical clarity the other lacked - funcs `c128_dxsmooth()` etc shared with CODE16K now moved there and renamed as `c16k_`; also fix extended char latching when exactly 4 extended chars at end also manual code set switching now honoured exactly even if immediate shift required; manual: make explicit that AI "(00)" and "(01)" prefixes added by Zint are HRT-only general: add `extern "C"` wrappers to a few header files
This commit is contained in:
parent
10747d6385
commit
93c3e27fba
23 changed files with 1017 additions and 958 deletions
|
@ -1769,13 +1769,13 @@ static void test_ean128_cc_shift(const testCtx *const p_ctx) {
|
|||
};
|
||||
/* Verified via bwipp_dump.ps against BWIPP except where noted, when shift verified manually (tec-it.com seems to be off by 2 for top shifts > 1) */
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_GS1_128_CC, -1, "[91]1", "[21]A1B2C3D4E5F6G7H8", 0, 6, 100, 0, "CC-A alignment, bottom shift 10, **NOT SAME** as BWIPP, Start B whereas BWIPP uses Start C, codeword count the same",
|
||||
/* 0*/ { BARCODE_GS1_128_CC, -1, "[91]1", "[21]A1B2C3D4E5F6G7H8", 0, 6, 100, 1, "CC-A alignment, bottom shift 10",
|
||||
"1101001000110100001000001101101011110111110010010001101010000010010000011101110100010000111011001010"
|
||||
"1101011000110101111001100001111010001101100010010000101111000011001101011100101100001000110011001010"
|
||||
"1101011100100011001100111101011000101110000010110000101001100110011110011011110011001110110111001010"
|
||||
"1101011110111000111011011001110010001011100010111000101011000011100110010000100000100010110111101010"
|
||||
"0000000000001011011110000101000100011010011011000110010110001100101000100001010001110010011100010100"
|
||||
"0000000000110100100001111010111011100101100100111001101001110011010111011110101110001101100011101011"
|
||||
"0000000000001011000110000101000100001001001010000100010110001100101000100001011000100110011100010100"
|
||||
"0000000000110100111001111010111011110110110101111011101001110011010111011110100111011001100011101011"
|
||||
},
|
||||
/* 1*/ { BARCODE_GS1_128_CC, -1, "[91]12", "[21]A1B2C3D4E5F6G7H8", 0, 6, 99, 1, "CC-A alignment, bottom shift 12",
|
||||
"110100100011010000100000110110101111011111001001000110101000001001000001110111010001000011101100101"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue