Well, I'm quite sure that 99.999% of the QRCode softwares/readers don't
support this approach (because they don't support structured append or
the processing of ECI designators other than standard character sets),
and this is the reason I have these doubts, I cannot compare/verify my
understanding with real codes produced via other systems.
Clearly it would be simpler to insert only a link to the file in the
qrcode, but my scenario has different requirements. I'm going to add
support for these features in both encodind/decoding, but to implement
them correctly I have to clear my doubts.
About the feasibility of the task, I have no doubts, but I have a few
about the ECI headers encoding.
First scenario: encoding raw binary data.
Using only the Interpretative Character Set ECI 000899 (8-bit binary
data) header seems quite straightforward, even if I don't understand why
the qrcode specification says such header should be put in every symbol
[1] (you have to decode all the previous symbols anyway, so it seems to
me just just a waste of space and an additional cause of confusion).
Sample meta-encoding of binary data ABCDEFGH:
First: (Structured append: 1 of 2) (ECI mode: 000899) (8bit mode: ABCD)
Second: (Structured append: 2 of 2) (ECI mode: 000899) (8bit mode: EFGH)
The parity data is to be calculated on "ABCDEFGH" [2].
Second scenario: encoding a compressed binary file.
For the compression, I have to use the Transformation Open Systems ECI
001800 (GZIP). I think this should be the last ECI Header before real
data encoding.
For the filename specification I have to use the Interpretative
Application Based ECI 800000 (Generic application launcher) [3] that
requires a previous Interpretative Prefix ECI [4] to specify the
filename. Such ECI header is a little different from the others, in the
sense that's not only identified by a number, but has also a payload
(the filename in this case), that's not part of the encoding data, but
should be encoded, too, in some way. I cannot find a description on how
to do it.
Sample meta-encoding of binary file "test.txt", assuming GZIP(test.txt)
= "ABCDEFGH":
First: (Structured append: 1 of 2) (ECI mode: 810899) [test.txt] (ECI
mode: 800000) (ECI mode: 001800) (8bit mode: ABCD)
Second: (Structured append: 2 of 2) [*] (8bit mode: EFGH)
The parts enclosed in [] are nebulous.
References:
[1] ECIs and Structured Append
Any ECI(s) invoked shall apply subject to the rules defined above and in
the AIM ECI specification until the end of
the encoded data or a change of ECI (signaled by Mode Indicator 0111).
If the encoded data in the ECI(s) extends
through two or more symbols in Structured Append Mode, it is necessary
to provide an ECI header consisting of
ECI Mode Indicator and ECI Designator number for each ECI in force,
immediately following the Structured Append
header, in subsequent symbols in which the ECI continues in force.
[2] Parity Data
The Parity Data shall be an 8 bit byte following the Symbol Sequence
Indicator. The parity data is a value obtained
by XORing byte by byte the values of all the original input data before
division into symbol blocks. Mode
Indicators, Character Count Identifiers, padding bits, Terminator and
Pad Characters shall be excluded from the
calculation. In ECI
Mode the 8-bit byte values obtained after any encryption or compression
of the data shall be used for the
calculation.
[3] Generic application launcher
The data within the scope of this ECI is in a standard file format
identified by the file name extension that is indicated by the
immediately preceding Interpretative Prefix ECI.
[4] Interpretative Prefix ECI
The interpretative Prefix ECI 810899 is invoked to provide a description
or tag or additional information which will apply to the following
Interpretative ECI. All of the test between the \810899 and the
backslash of the following Interpretative ECI is the prefix data.
[3] Publicly available ECI standard
http://www.aimglobal.org/standards/symbinfo/tsc-04-002%20eci%20pubrev.pdf
--
Alex Dupre
email: paullo...@hotmail.com