stmitt / base45-swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple base45 encoder/decoder.

Qr and Aztec code have a specific, highly efficient, method for storing alphanumeric characters (MODE 2/0010). In particular compared to UTF-8 (where the first 32 characters are essentially unused; and successive non-latin characters loose an additional 128 values as the topbit needs to be set).

Details of this 11 bits per two characters can be found at

For this reason - the industry generally encodes these in base45. A document for this defacto standard is in flight:

```https://datatracker.ietf.org/doc/draft-faltstrom-base45/```

version history v1.00 first version v1.01 27/5 Fix #5 / add guard for overflow is added. Credits @ArturFriesen

About


Languages

Language:Swift 79.0%Language:Ruby 21.0%