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 #178

Open
kousu opened this issue Apr 3, 2019 · 1 comment
Open

Structured Append #178

kousu opened this issue Apr 3, 2019 · 1 comment
Labels

Comments

@kousu
Copy link

kousu commented Apr 3, 2019

In the QR spec, section 9, "Structured Append" is defined. This is is an extra tag that lets you encode page numbers onto QR codes: the tag consists of {M: 4 bits, N: 4 bits, parity: 8 bits}, where M is the index, N is the total count of codes involved, and parity is an ID tag to identify the group of QR codes (it's also the xor of every byte in the byte payload, for a little bit of extra error-detection).

This feature lets you send longer data through QR codes.

qrencode supports this as qrencode -S (and you need -8 to make it not stop at nulls, and it insists on -v), e.g.:

$ curl -s "https://sampleswap.org//samples-ghost/DRUM%20LOOPS%20and%20BREAKS/161%20to%20180%20bpm/128\[kb\]161_amenvar3.aif.mp3" | qrencode -S -8 -o amen.png
Version must be specified to encode structured symbols.
$ curl -s "https://sampleswap.org//samples-ghost/DRUM%20LOOPS%20and%20BREAKS/161%20to%20180%20bpm/128\[kb\]161_amenvar3.aif.mp3" | qrencode -S -8 -v 20 -o amen.png

produces the attached codes.

I've just implemented this for cozmo/jsQR#132. If it was implemented here then there would be a complete javascript flow for long QR codes.

amen-01
amen-02
amen-03
amen-04
amen-05
amen-06
amen-07
amen-08
amen-09
amen-10

@soldair
Copy link
Owner

soldair commented Apr 9, 2019

wow jsQR is really cool. its been on my list for a long time to make a reader and now we dont have to! =)
I am interested in having this feature added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants