Skip to content

Structured Append #178

@kousu

Description

@kousu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions