Skip to content

maxicode uszeropad#273

Closed
gitlost wants to merge 5 commits intomasterfrom
maxicode_uszeropad
Closed

maxicode uszeropad#273
gitlost wants to merge 5 commits intomasterfrom
maxicode_uszeropad

Conversation

@gitlost
Copy link
Contributor

@gitlost gitlost commented Oct 9, 2024

  • code128: Avoid extraneous CodeC switch Avoid extraneous CodeC switch (with immediate switch back to CodeA/B) by re-checking digit runlength >= 4 after enca/encb push
  • 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

  Avoid extraneous CodeC switch (with immediate switch back to
  CodeA/B) by re-checking digit runlength >= 4 after enca/encb push

  Also simplify `numsscr` to return only `nums` as `nchars` unused
  (cf codablockf and code16k which similarly could be simplified)
  Adapted from OkapiBarcode, with stricter interpretation (only pad
  if "+4" totally absent), props Daniel Gredler
@gitlost gitlost closed this Oct 9, 2024
@terryburton
Copy link
Member

@gitlost Was this closed in error, or are you reworking it?

@gitlost
Copy link
Contributor Author

gitlost commented Oct 9, 2024 via email

@terryburton
Copy link
Member

Thanks!

I'm not sure whether you spotted the opportunities for further optimisation of Code 128 in #272

If you start to look then just let me know. Otherwise I'll poke it next week when I'm at the WG1 meeting in London.

@terryburton terryburton deleted the maxicode_uszeropad branch October 9, 2024 17:25
@gitlost
Copy link
Contributor Author

gitlost commented Oct 9, 2024

I hadn't no, just checked them out now.

Good cases, zint fails on the 1st one (FNC4), same as bwipp, as both use 5 chars as the non-terminal cut-off. A simple fix for that could be lower the cut-off to 4 - will check it out.

zint passes the 2 middle cases which bwipp fails, and both pass the last one.

Will have a look and let you know if I make headway (hopefully avoiding the usual whack-a-mole issues).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants