From fd7966c3335ab83c73e563c104adc0967aff6d3a Mon Sep 17 00:00:00 2001 From: gitlost Date: Wed, 9 Oct 2024 17:52:06 +0100 Subject: [PATCH] maxicode: Zero-pad US postcodes that lack "+4" (Annex B.1.4a) Adapted from OkapiBarcode, with stricter interpretation (only pad if "+4" totally absent), props Daniel Gredler --- src/maxicode.ps | Bin 26862 -> 27154 bytes tests/ps_tests/maxicode.ps | Bin 0 -> 5972 bytes tests/ps_tests/test.ps | Bin 4832 -> 4874 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/ps_tests/maxicode.ps diff --git a/src/maxicode.ps b/src/maxicode.ps index e904ea955561ee8d9a7cd25465183b9f276e3f63..4bb127632c36b95d94c742122f52b85f5d63f51f 100644 GIT binary patch delta 288 zcmYk0KTg9i6voxHBV6E9rc|KBEdc==sTeXbR6T%ezXq$3ZES}WD#RT)2~w}Yg2c!f zy0Q`%gm~Ng{`~aq-UlxqgV*8oc|L{W zUR_TyK4X)U%L!u)S6b5=Wj4+VJ{scRiHJmcUa%494tD=Gr0X7d8WpZ3HYM^OC*4nVu*hBT delta 19 bcmbPqh4I}*#tmG~o9{WF6x#efOj;NKV9f~v diff --git a/tests/ps_tests/maxicode.ps b/tests/ps_tests/maxicode.ps new file mode 100644 index 0000000000000000000000000000000000000000..8b8a9a398605d4790244251b0041f6c08da9aef5 GIT binary patch literal 5972 zcmdT{{cjpa5dEFMVj3xutvYaDV2G4T*d{TOomj?J^UDG z?VjfO6_fL?e^s}u8~V{A{!1yQvbfRb zR-1}`(p6DXXSKLr(>2?3>DZ^IEWctTJ*C59`7JNGrGlbPtn$W(bdu6DYbMqbTwqHw zswWrg(bvuNru9?%7CDH~A2#C^fYzDF4c``oozshgN2lMFD4`7=WC zfMRyRl6~Q^DP{9ff~=Pc%kH^;Y;-ut$gYjEHLE$`YKaL;-eA*&_;$zKUQasVy+ktU zmQ^Llb|N!~ftd?~br24~6mHV6($sh~Qfb1~IKwwP*{8HCGvPc};NH4D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