10 > 64, in QR Codes
huonw.github.io
10 > 64, in QR Codes
1–10 of 83 posts
Re: 10 > 64, in QR Codes
#2I used this for digital QR code tickets [2], and it made the codes so much easier to scan, even with bad lighting.
[1] https://news.ycombinator.com/item?id=39094251
[2] https://workspace.google.com/marketplace/app/qr_code_ticket_...
Re: 10 > 64, in QR Codes
#3 qrencode -t UTF8 https://www.service.nsw.gov.au/campaign/service-nsw-mobile-app?data=eyJ0IjoiY292aWQxOV9idXNpbmVzcyIsImJpZCI6IjEyMTMyMSIsImJuYW1lIjoiVGVzdCBOU1cgR292ZXJubWVudCBRUiBjb2RlIiwiYmFkZHJlc3MiOiJCdXNpbmVzcyBhZGRyZXNzIGdvZXMgaGVyZSAifQ==
vs qrencode -t UTF8 https://www.service.nsw.gov.au/campaign/service-nsw-mobile-app?data=072685680885510189821994892577900638215789419258463239488533499278955911240512279111633336286737089008384293066931974311305533337894591404330656702603998035920596585517131555967430155259257402711671699276432408209151397638174974409842883898456527289026013404155725275860173673194594939
The latter one is actually smaller. TILRe: 10 > 64, in QR Codes
#4qrencode -t UTF8 https://www.service.nsw.gov.au/campaign/service-nsw-mobile-app?data=eyJ0IjoiY292aWQxOV9idXNpbmVzcyIsImJpZCI6IjEyMTMyMSIsImJuYW1lIjoiVGVzdCBOU1cgR292ZXJubWVudCBRUiBjb2RlIiwiYmFkZHJlc3MiOiJCdXNpbmVzcyBhZGRyZXNzIGdvZXMgaGVyZSAifQ== vs qrencode -t UTF8 https://www.service.nsw.gov.au/campaign/service-nsw-mobile-app?data=07268568088551018982199489257790063821578941925846323948853349927895591124051227911163…
I'm not sure that qrencode CLI tool will automatically do this for you.
> In a URL, the rest of the URL is not purely numeric, so actually seeing the benefits of this encoding requires using two segments:
> * one with the “boring” bits of the URL at the start, likely using the Binary mode
> * one with the big blob of base10 data, using the Numeric mode
Re: 10 > 64, in QR Codes
#5 "',/[]\
Incidentally, this also makes them JSON-Safe.Base94 uses all printable characters, and Base122 uses both printable characters and whitespace.
UUIDs encoded in various alphabets:
len algo value
24 Base64 padded wScmB8cVS/K05Wk+nORR8Q==
22 Base64 unpadded osnQ3DUDTDuUQBc9mBRYFw
20 Base85 rHoLuTk%W0fgpY+`c>xc
20 Base94 d(+H"Q/hP}i}d9Re: 10 > 64, in QR Codes
#6qrencode -t UTF8 https://www.service.nsw.gov.au/campaign/service-nsw-mobile-app?data=eyJ0IjoiY292aWQxOV9idXNpbmVzcyIsImJpZCI6IjEyMTMyMSIsImJuYW1lIjoiVGVzdCBOU1cgR292ZXJubWVudCBRUiBjb2RlIiwiYmFkZHJlc3MiOiJCdXNpbmVzcyBhZGRyZXNzIGdvZXMgaGVyZSAifQ== vs qrencode -t UTF8 https://www.service.nsw.gov.au/campaign/service-nsw-mobile-app?data=07268568088551018982199489257790063821578941925846323948853349927895591124051227911163…
Note that the URL also has to be encoded in two segments, so that the decimal part can use a more efficient QR encoding than the alphanumeric base URL. I'm not sure that qrencode CLI tool will automatically do this for you. > In a URL, the rest of the URL is not purely numeric, so actually seeing the benefits of this encoding requires using two segments: > * one with the “boring” bits of the URL at the start, likely…
If I'm looking at the correct repository, it does [1].
[1] https://github.com/fukuchi/libqrencode/blob/master/split.c
Re: 10 > 64, in QR Codes
#70: https://www.nayuki.io/page/optimal-text-segmentation-for-qr-...
Re: 10 > 64, in QR Codes
#82 alphanumerics (=4000 links) is plenty to encode a link to all the major pages of your website/service you may want to advertise. 10 alphanumerics (=10^18) is plenty that even if every person in the world had a QR code, nobody could guess one before hitting your rate limiter.
The user experience gained by fast reliable scanning is far greater than that enabled by slightly improved offline support (offline functionality requires that the user already has your app installed, and in that case, you could preload any codes that user had access to).
Re: 10 > 64, in QR Codes
#9Earlier quoted context omitted.
Note that the URL also has to be encoded in two segments, so that the decimal part can use a more efficient QR encoding than the alphanumeric base URL. I'm not sure that qrencode CLI tool will automatically do this for you. > In a URL, the rest of the URL is not purely numeric, so actually seeing the benefits of this encoding requires using two segments: > * one with the “boring” bits of the URL at the start, likely…
> I'm not sure that qrencode CLI tool will automatically do this for you. If I'm looking at the correct repository, it does [1]. [1] https://github.com/fukuchi/libqrencode/blob/master/split.c
Re: 10 > 64, in QR Codes
#10Or... Don't encode data in the URL at all. If your data isn't secret or per-user, have it go to https://yoursite.com/gh . If it is security sensitive, go to https://yoursite.com/Qhm4Qr55mS 2 alphanumerics (=4000 links) is plenty to encode a link to all the major pages of your website/service you may want to advertise. 10 alphanumerics (=10^18) is plenty that even if every person in the world had a QR code, nobody cou…