public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Christopher Allen <ChristopherA@lifewithalacrity•com>
To: Andrew Poelstra <apoelstra@wpsoftware•net>,
	 Bitcoin Protocol Discussion
	<bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] Codex32
Date: Sun, 19 Feb 2023 15:05:12 -0800	[thread overview]
Message-ID: <CACrqygByMiEJNmn33DjOet8m3kjz116y-8y8v7EYrLq1-NG95w@mail.gmail.com> (raw)
In-Reply-To: <Y/Ke4yV7eV/87Kat@camus>

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

An easy but possibly very important tip:

If you use only UPPER CASE alpha and numbers in codex32, and avoid most
punctuation, it makes QR rendering of it significantly smaller. This is
because the QR code to the ISO SPEC, when seeing lowercase, assumes the
value is binary, then converts it to a two byte value. If instead, the
codex32 is all upper, and it uses only the 45 allowed characters (see
https://www.thonky.com/qr-code-tutorial/alphanumeric-table) , it will leave
it single byte and try to compress it. Of course it doesn’t compress well,
but that is OK because it at least didn’t double the size first.

See our research on this topic at
https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-003-uri-binary-compatibility.md

A superior QR codec can do better (see our
https://github.com/BlockchainCommons/QRCodeGenerator or
https://www.nayuki.io/page/qr-code-generator-library) but many platforms
and more basic QR codecs will double the size of the QR if you have any
lower case.

— Christopher Allen

[-- Attachment #2: Type: text/html, Size: 1662 bytes --]

  reply	other threads:[~2023-02-19 23:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16  2:16 Russell O'Connor
2023-02-16 11:50 ` Pavol Rusnak
2023-02-16 13:49   ` Andrew Poelstra
2023-02-19 20:13     ` David A. Harding
2023-02-19 22:12       ` Andrew Poelstra
2023-02-19 23:05         ` Christopher Allen [this message]
2023-02-20  0:52         ` Russell O'Connor
2023-02-22 16:29         ` Peter Todd
2023-02-22 19:01           ` Russell O'Connor
2023-02-23  3:30             ` Russell O'Connor
2023-02-23 16:36               ` Russell O'Connor
2023-02-23 18:26               ` Russell O'Connor
2023-02-22 17:24       ` Russell O'Connor
2023-02-20 18:44 ` Andrew Poelstra
2023-02-20 18:48   ` Pavol Rusnak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACrqygByMiEJNmn33DjOet8m3kjz116y-8y8v7EYrLq1-NG95w@mail.gmail.com \
    --to=christophera@lifewithalacrity$(echo .)com \
    --cc=apoelstra@wpsoftware$(echo .)net \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox