Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Convert rawData to Uint8Array #294

Merged
merged 4 commits into from
Jul 31, 2019
Merged

feat: Convert rawData to Uint8Array #294

merged 4 commits into from
Jul 31, 2019

Conversation

maciejhirsz
Copy link
Contributor

No description provided.

Copy link
Contributor

@pmespresso pmespresso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sometimes padding ends prematurely at ec made a suggestion for handling this but I would really like to know wth is going on there

@maciejhirsz
Copy link
Contributor Author

Everything should be fine now!

@maciejhirsz
Copy link
Contributor Author

maciejhirsz commented Jul 31, 2019

@yjkimjunior the comment I left in the code might be misleading, the SQRC is private date that replaces the ec11 padding, the padding is just there to, from what I'm able to gather, make it easier to turn the data into a square. As for the padding:

The byte padding consists of alternating hex EC and 11 until the capacity is reached.

Emphasis mine, so ending on ec is totally valid.

There is also a possibility of bit padding between terminator and the ec11 stuff, but since we only expect a single binary segment, and the indicator + terminator are exactly 8 bits, this never happens for us.

Copy link
Contributor

@pmespresso pmespresso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maciejhirsz thanks! I gathered as much from Jaco last night, also found some reading material on SQRC lol http://ereimer.net/rants/qrcode.htm

@maciejhirsz maciejhirsz merged commit 41ef104 into master Jul 31, 2019
@maciejhirsz maciejhirsz deleted the mh-qr-binary branch July 31, 2019 14:42
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