Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #113

Merged
merged 3 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 41 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# multibase
# Multibase

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats)
Expand Down Expand Up @@ -58,33 +58,49 @@ The current multibase table is [here](multibase.csv):
```
encoding, code, description, status
identity, 0x00, 8-bit binary (encoder and decoder keeps data unmodified), default
base2, 0, binary (01010101), candidate
base8, 7, octal, draft
base10, 9, decimal, draft
base16, f, hexadecimal, default
base16upper, F, hexadecimal, default
base32hex, v, rfc4648 case-insensitive - no padding - highest char, candidate
base32hexupper, V, rfc4648 case-insensitive - no padding - highest char, candidate
base32hexpad, t, rfc4648 case-insensitive - with padding, candidate
base32hexpadupper, T, rfc4648 case-insensitive - with padding, candidate
base32, b, rfc4648 case-insensitive - no padding, default
base32upper, B, rfc4648 case-insensitive - no padding, default
base32pad, c, rfc4648 case-insensitive - with padding, candidate
base32padupper, C, rfc4648 case-insensitive - with padding, candidate
base2, 0, Binary (01010101), candidate
base8, 7, Octal, draft
base10, 9, Decimal, draft
base16, f, Hexadecimal (lowercase), default
base16upper, F, Hexadecimal (uppercase), default
base32hex, v, RFC4648 case-insensitive - no padding - highest char, candidate
base32hexupper, V, RFC4648 case-insensitive - no padding - highest char, candidate
base32hexpad, t, RFC4648 case-insensitive - with padding, candidate
base32hexpadupper, T, RFC4648 case-insensitive - with padding, candidate
base32, b, RFC4648 case-insensitive - no padding, default
base32upper, B, RFC4648 case-insensitive - no padding, default
base32pad, c, RFC4648 case-insensitive - with padding, candidate
base32padupper, C, RFC4648 case-insensitive - with padding, candidate
base32z, h, z-base-32 (used by Tahoe-LAFS), draft
base36, k, base36 [0-9a-z] case-insensitive - no padding, draft
base36upper, K, base36 [0-9a-z] case-insensitive - no padding, draft
base58btc, z, base58 bitcoin, default
base58flickr, Z, base58 flicker, candidate
base64, m, rfc4648 no padding, default
base64pad, M, rfc4648 with padding - MIME encoding, candidate
base64url, u, rfc4648 no padding, default
base64urlpad, U, rfc4648 with padding, default
proquint, p, PRO-QUINT https://arxiv.org/html/0901.4016, draft
base256emoji, 🚀, base256 with custom alphabet using variable-sized-codepoints, draft
base36, k, Base36 [0-9a-z] case-insensitive - no padding, draft
base36upper, K, Base36 [0-9a-z] case-insensitive - no padding, draft
base58btc, z, Base58 bitcoin, default
base58flickr, Z, Base58 flicker, candidate
base64, m, RFC4648 no padding, default
base64pad, M, RFC4648 with padding - MIME encoding, candidate
base64url, u, RFC4648 no padding, default
base64urlpad, U, RFC4648 with padding, default
proquint, p, Proquint (https://arxiv.org/html/0901.4016), draft
base256emoji, 🚀, Base256 with custom alphabet using variable-sized-codepoints, draft
```

**NOTE:** Multibase-prefixes are encoding agnostic. "z" is "z", not 0x7a ("z" encoded as ASCII/UTF-8). For example, in UTF-32, "z" would be `[0x7a, 0x00, 0x00, 0x00]`.
**NOTE:** Multibase-prefixes are encoding agnostic. "z" is "z", not 0x7a ("z" encoded as ASCII/UTF-8). For example, in UTF-32, "z" would be `[0x7a, 0x00, 0x00, 0x00]`. Also note the difference between `0x00` (codepoint 0 or 0x00) and `0` (codepoint 48 or 0x30).

## Specifications

Below is a list of specs for the underlying base encodings:

- `base2` [Base2 RFC](rfcs/Base2.md)
- `base8` [Base8 RFC](rfcs/Base8.md), similar to [rfc4648](https://datatracker.ietf.org/doc/html/rfc4648.html)
- `base10` [Base10 RFC](rfcs/Base10.md)
- `base36` [Base36 RFC](rfcs/Base36.md)
- `base16*` [RFC4648](https://datatracker.ietf.org/doc/html/rfc4648.html)
- `base32*` (Except for `base32z`) [rfc4648](https://datatracker.ietf.org/doc/html/rfc4648.html)
- `base32z` [Human-oriented base32 spec](https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt)
- `base64*` [RFC4648](https://datatracker.ietf.org/doc/html/rfc4648.html)
- `base58btc` https://datatracker.ietf.org/doc/html/draft-msporny-base58-02
- `base58flickr` https://datatracker.ietf.org/doc/html/draft-msporny-base58-02, but using a different alphabet
- `proquint` [Proquint RFC](rfcs/Proquint.md), which is the [original spec](https://arxiv.org/html/0901.4016) with an added prefix for legibility

## Reserved

Expand Down
46 changes: 23 additions & 23 deletions multibase.csv
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
encoding, code, description, status
identity, 0x00, 8-bit binary (encoder and decoder keeps data unmodified), default
base2, 0, binary (01010101), candidate
base8, 7, octal, draft
base10, 9, decimal, draft
base16, f, hexadecimal, default
base16upper, F, hexadecimal, default
base32hex, v, rfc4648 case-insensitive - no padding - highest char, candidate
base32hexupper, V, rfc4648 case-insensitive - no padding - highest char, candidate
base32hexpad, t, rfc4648 case-insensitive - with padding, candidate
base32hexpadupper, T, rfc4648 case-insensitive - with padding, candidate
base32, b, rfc4648 case-insensitive - no padding, default
base32upper, B, rfc4648 case-insensitive - no padding, default
base32pad, c, rfc4648 case-insensitive - with padding, candidate
base32padupper, C, rfc4648 case-insensitive - with padding, candidate
base2, 0, Binary (01010101), candidate
base8, 7, Octal, draft
base10, 9, Decimal, draft
base16, f, Hexadecimal (lowercase), default
base16upper, F, Hexadecimal (uppercase), default
base32hex, v, RFC4648 case-insensitive - no padding - highest char, candidate
base32hexupper, V, RFC4648 case-insensitive - no padding - highest char, candidate
base32hexpad, t, RFC4648 case-insensitive - with padding, candidate
base32hexpadupper, T, RFC4648 case-insensitive - with padding, candidate
base32, b, RFC4648 case-insensitive - no padding, default
base32upper, B, RFC4648 case-insensitive - no padding, default
base32pad, c, RFC4648 case-insensitive - with padding, candidate
base32padupper, C, RFC4648 case-insensitive - with padding, candidate
base32z, h, z-base-32 (used by Tahoe-LAFS), draft
base36, k, base36 [0-9a-z] case-insensitive - no padding, draft
base36upper, K, base36 [0-9a-z] case-insensitive - no padding, draft
base58btc, z, base58 bitcoin, default
base58flickr, Z, base58 flicker, candidate
base64, m, rfc4648 no padding, default
base64pad, M, rfc4648 with padding - MIME encoding, candidate
base64url, u, rfc4648 no padding, default
base64urlpad, U, rfc4648 with padding, default
proquint, p, PRO-QUINT https://arxiv.org/html/0901.4016, draft
base256emoji, 🚀, base256 with custom alphabet using variable-sized-codepoints, draft
base36, k, Base36 [0-9a-z] case-insensitive - no padding, draft
base36upper, K, Base36 [0-9a-z] case-insensitive - no padding, draft
base58btc, z, Base58 bitcoin, default
base58flickr, Z, Base58 flicker, candidate
base64, m, RFC4648 no padding, default
base64pad, M, RFC4648 with padding - MIME encoding, candidate
base64url, u, RFC4648 no padding, default
base64urlpad, U, RFC4648 with padding, default
proquint, p, Proquint (https://arxiv.org/html/0901.4016), draft
base256emoji, 🚀, Base256 with custom alphabet using variable-sized-codepoints, draft
2 changes: 1 addition & 1 deletion rfcs/Base2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ order, where each byte of the array is set to the character `1`, if the
corresponding bit in the byte is set, and the character `0` if the corresponding
bit is unset.

For example, `[0x58, 0x59, 0x60]` can be converted to multibase base2 as
For example, `[0x58, 0x59, 0x5a]` can be converted to multibase base2 as
follows:

```
Expand Down
7 changes: 0 additions & 7 deletions rfcs/PRO-QUINT.md

This file was deleted.

16 changes: 16 additions & 0 deletions rfcs/Proquint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# PRO-QUINT

For the original proquint specification, see: https://arxiv.org/html/0901.4016 ([/ipfs/bafybeib5jsyi5igjwhi7hzkfebpvnq2ykbwpxeaaxlkyfyxqvcecoao4qa](https://dweb.link/ipfs/bafybeib5jsyi5igjwhi7hzkfebpvnq2ykbwpxeaaxlkyfyxqvcecoao4qa)).

The multibase prefix for proquints is the character `p`. The base encoded data is the encoded data according to the original specification, with an additional `ro-` prefix:

```
<multibase-prefix-character><additional-prefix-characters><proquint-encoded-data>
```

The resulting full prefix for the actual proquint encoded data is `pro-`, making multibase-encoded proquints easily pronouncable.
For example, the proquint encoding of the bytestring `[127, 0, 0, 1]` (the data for the IPv4 address `127.0.0.1`) is `lusab-babad`, so the corresponding multibase-encoded proquint bytestring is:

```
pro-lusab-babad
```