Skip to content

Commit

Permalink
Merge pull request multiformats#62 from multiformats/fix/not-wip
Browse files Browse the repository at this point in the history
Stabilize the spec
  • Loading branch information
Stebalien authored Nov 19, 2019
2 parents f2d3c43 + 35af25d commit 54f897a
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 47 deletions.
58 changes: 33 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# multibase (WIP)
# 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 @@ -32,7 +32,7 @@ multibase comes in. It answers the question:
## Table of Contents

- [Format](#format)
- [Multibase Table v1.0.0-RC (semver)](#multibase-table-v100-rc-semver)
- [Multibase Table](#multibase-table)
- [Multibase By Example](#multibase-by-example)
- [FAQ](#faq)
- [Implementations:](#implementations)
Expand All @@ -51,33 +51,33 @@ The Format is:

Where `<base-encoding-character>` is used according to the multibase table.

### Multibase Table v1.0.0-RC (semver)
### Multibase Table

The current multibase table is [here](multibase.csv):

```
encoding, code, description
identity, 0x00, 8-bit binary (encoder and decoder keeps data unmodified)
base2, 0, binary (01010101)
base8, 7, octal
base10, 9, decimal
base16, f, hexadecimal
base16upper, F, hexadecimal
base32hex, v, rfc4648 no padding - highest char
base32hexupper, V, rfc4648 no padding - highest char
base32hexpad, t, rfc4648 with padding
base32hexpadupper, T, rfc4648 with padding
base32, b, rfc4648 no padding
base32upper, B, rfc4648 no padding
base32pad, c, rfc4648 with padding
base32padupper, C, rfc4648 with padding
base32z, h, z-base-32 (used by Tahoe-LAFS)
base58flickr, Z, base58 flicker
base58btc, z, base58 bitcoin
base64, m, rfc4648 no padding
base64pad, M, rfc4648 with padding - MIME encoding
base64url, u, rfc4648 no padding
base64urlpad, U, rfc4648 with padding
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 no padding - highest char, candidate
base32hexupper, V, rfc4648 no padding - highest char, candidate
base32hexpad, t, rfc4648 with padding, candidate
base32hexpadupper, T, rfc4648 with padding, candidate
base32, b, rfc4648 no padding, default
base32upper, B, rfc4648 no padding, default
base32pad, c, rfc4648 with padding, candidate
base32padupper, C, rfc4648 with padding, candidate
base32z, h, z-base-32 (used by Tahoe-LAFS), draft
base58flickr, Z, base58 flicker, candidate
base58btc, z, base58 bitcoin, default
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
```

**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]`.
Expand All @@ -92,6 +92,14 @@ The following codes are _reserved_ for backwards compatibility with existing sys
If you'd like to switch a project over to multibase and would also like to
reserve a prefix for compatibility, please file an issue.

## Status

Each multibase encoding has a status:

* draft - these encodings have been proposed but are not widely implemented and may be removed.
* candidate - these encodings are mature and widely implemented but may not be implemented by all implementations.
* default - these encodings should be implemented by all implementations and are widely used.

## Multibase By Example

Consider the following encodings of the same binary string:
Expand Down
44 changes: 22 additions & 22 deletions multibase.csv
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
encoding, code, description
identity, 0x00, 8-bit binary (encoder and decoder keeps data unmodified)
base2, 0, binary (01010101)
base8, 7, octal
base10, 9, decimal
base16, f, hexadecimal
base16upper, F, hexadecimal
base32hex, v, rfc4648 no padding - highest char
base32hexupper, V, rfc4648 no padding - highest char
base32hexpad, t, rfc4648 with padding
base32hexpadupper, T, rfc4648 with padding
base32, b, rfc4648 no padding
base32upper, B, rfc4648 no padding
base32pad, c, rfc4648 with padding
base32padupper, C, rfc4648 with padding
base32z, h, z-base-32 (used by Tahoe-LAFS)
base58flickr, Z, base58 flicker
base58btc, z, base58 bitcoin
base64, m, rfc4648 no padding
base64pad, M, rfc4648 with padding - MIME encoding
base64url, u, rfc4648 no padding
base64urlpad, U, rfc4648 with padding
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 no padding - highest char, candidate
base32hexupper, V, rfc4648 no padding - highest char, candidate
base32hexpad, t, rfc4648 with padding, candidate
base32hexpadupper, T, rfc4648 with padding, candidate
base32, b, rfc4648 no padding, default
base32upper, B, rfc4648 no padding, default
base32pad, c, rfc4648 with padding, candidate
base32padupper, C, rfc4648 with padding, candidate
base32z, h, z-base-32 (used by Tahoe-LAFS), draft
base58flickr, Z, base58 flicker, candidate
base58btc, z, base58 bitcoin, default
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

0 comments on commit 54f897a

Please sign in to comment.