4 ms·
It is the first I've heard of it too but according to this draft spec QR codes can't support binary: https://datatracker.ietf.org/doc/draft-faltstrom-base45/ h
by dugmartin 5y ago
It is the first I've heard of it too but according to this draft spec QR codes can't support binary:
https://datatracker.ietf.org/doc/draft-faltstrom-base45/ https://datatracker.ietf.org/doc/draft-faltstrom-base45/
"Even in Byte mode a typical QR-code reader tries to interpret a byte sequence as an UTF-8 or ISO/IEC 8859-1 encoded text. Thus QR-codes cannot be used to encode arbitrary binary data directly. Such data has to be converted into an appropriate text before that text could be encoded as a QR-code. Compared to already established Base64, Base32 and Base16 encoding schemes, that are described in RFC 4648 [RFC4648], the Base45 scheme described in this document offer a more compact QR-code encoding."
Here is the output alphabet:
Value Encoding Value Encoding Value Encoding Value Encoding
00 0 12 C 24 O 36 Space
01 1 13 D 25 P 37 $
02 2 14 E 26 Q 38 %
03 3 15 F 27 R 39 *
04 4 16 G 28 S 40 +
05 5 17 H 29 T 41 -
06 6 18 I 30 U 42 .
07 7 19 J 31 V 43 /
08 8 20 K 32 W 44 :
09 9 21 L 33 X
10 A 22 M 34 Y
11 B 23 N 35 Z
My initial thought is using "Space" as a valid encoded value seems like an enormous foot gun.
- justinmchase 5y agoTo trim or not to trim, that is the question
- lymeswold 5y ago(2^16)^(1/3) < 41 So why base 45?
- lesquivemeau 5y agoBecause you encode using 45 different characters
- KMag 5y agoThe GP is saying 3 base41 characters can encode 2 bytes. Using base45 doesn't shorten the encoded message size unless they increase the encoding unit to more than 2 bytes.
- kubanczyk 5y agoYes, 41 characters would be sufficient. I would have omitted these four (the asterix being there only to have a consecutive subset): 36 Space 37 $ 38 % 39 * Especially % can be confusing, as %20AA seems like a valid base45 both before and after urldecode. The $ is a lesser footgun. I'd be keen to learn why they decided to use full 45 characters available in alphanumeric QR.
- jfrunyon 5y agohttps://www.youtube.com/watch?v=0oBx7Jg4m-o https://www.youtube.com/watch?v=0oBx7Jg4m-o