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

Structured Append missing "N" #63

Closed
kousu opened this issue Apr 3, 2019 · 0 comments
Closed

Structured Append missing "N" #63

kousu opened this issue Apr 3, 2019 · 0 comments
Assignees

Comments

@kousu
Copy link

kousu commented Apr 3, 2019

The "structured append" paging header has three parts: M, N and parity. M is the index of the current code, N is the number of codes in the set, and parity is the checksum to identify them all as belonging together. M and N are both 4 bits, but

https://github.com/nu-book/zxing-cpp/blob/e1d7de9cba1d912a3a13bd5e4c2e6deb80643d41/core/src/qrcode/QRDecoder.cpp#L340-L348

pulls both M and N into the same 8 bit variable. They should be separated and exposed as separate values. The DecoderResult misleadingly calls this 8-bit (M,N) tuple the "sequence number":

https://github.com/nu-book/zxing-cpp/blob/e1d7de9cba1d912a3a13bd5e4c2e6deb80643d41/core/src/qrcode/QRDecoder.cpp#L414

when in fact only the first four bits are that.

@huycn huycn self-assigned this May 1, 2019
huycn added a commit to huycn/zxing-cpp that referenced this issue May 2, 2019
@axxel axxel closed this as completed in 2520625 May 3, 2019
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

No branches or pull requests

2 participants