cyphar / paperback

Paper backup generator suitable for long-term storage.
GNU General Public License v3.0
1.11k stars 39 forks source link

Base32 is recommended for encoding, as it has many benefits. #92

Open wy16W2pIilK1xgqN opened 1 month ago

wy16W2pIilK1xgqN commented 1 month ago

I know that using a QR code with Base32 is not the most efficient, but this can greatly reduce the character output, which is more ergonomic.


PS: I don't underst English, this answer is made using Microsoft Translator, I hope you can underst

wy16W2pIilK1xgqN commented 1 month ago

Explain the benefits of using Base32.

  1. When humans copy and paste, there are fewer characters. In actual use, there are always situations that require manual intervention, and the number of characters is less, not pure numbers, which is more friendly to people.

  2. Add first and last characters to have more functionality and provide robustness There are some lower quality QR code decoding programs, for large QR codes there are decoding errors, adding some characters at the beginning and end of the data, there are human and software recognition. "Start 3 9 block" and "End 3 9 block" are used at the beginning and end of the encoding, which can give humans an obvious confirmation of decoding and can also identify the program as the first block of data. "-" indicates the start and end of base32 data, and "+" indicates the encoding complement.

If there is an error in the decoding of the QR code, it is generally obvious that there will be a significant change from the point where the error occurred, so that it can be easily identified. With this style, you can easily add other control characters to achieve more functions.

Example:


Start 3 9 block
-CDS6YRVBCSQQ4S10C9GQ6S9K68G2R838EHT70WST5WQQEXVQ5SHQ4VV3DDK6YWK45SHPYV9FC9GQ6S9K68Q6GX3DD++++++-
End 3 9 block

PS: The Crockford Base32 is better suited for human recognition. https://www.crockford.com/base32.html