Added optional argument to decode method to allow binary data decoded #45
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.
Hi,
I needed to be able to decode datamatrix codes that were originally encoded with the base256 scheme, but the current decoding support was only for strings. Zero bytes in the payload were problematic. So, I added an optional argument binary= to the decode() call.
I'm using Python 3.6 under ubuntu 18.04 for my development. It seems to pass the existing tests in the tests folder on my box, but I don't know if I created a regression for other platforms or Python versions.
I also did not expand the tests to cover binary payload.
I'm not sure if this is the best way to accomplish what I attempted, but it seems to work for me.
This is my first pull request, so I hope I did it correctly. Thanks!
-Kurt