Added two feature flags and charset selection on init #223
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature flag: enable_optimization
To me it seems like the optimization could create a wrong barcode so I have added the ability to enable or disable the optimization
Example: Say you would like to generate a CODE128C barcode with a payload like 995560. The optimization would remove the 99 from the barcode. If you then scan the barcode the content is 5560.
Feature flag: enable_hybrid_charset
In some cases you might want to have a pure CODE128A, CODE128B or CODE128C barcode so I have added the ability to enable or disable the current way of generating barcode which allows hybrid charset.
Looking at some specs, hybrid char set is not really the standard: https://en.wikipedia.org/wiki/Code_128
All changes I've made don't change the current way of generating barcode unless you disable the new flags. It's 100% backwards compatible.