Skip to content

Commit

Permalink
update table to better match the table in multicodec
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Nov 15, 2018
1 parent 630368f commit 2d10836
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 66 deletions.
41 changes: 23 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,29 @@ Where `<varint-base-encoding-code>` is used according to the multibase table. No
The current multibase table is [here](multibase.csv):

```
encoding codes name
identity 0x00 8-bit binary (encoder and decoder keeps data unmodified)
base1 1 unary tends to be 11111
base2 0 binary has 1 and 0
base8 7 highest char in octal
base10 9 highest char in decimal
base16 F, f highest char in hex
base32 B, b rfc4648 - no padding - highest letter
base32pad C, c rfc4648 - with padding
base32hex V, v rfc4648 - no padding - highest char
base32hexpad T, t rfc4648 - with padding
base32z h z-base-32 - used by Tahoe-LAFS - highest letter
base58flickr Z highest char
base58btc z highest char
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
identity, 0x00, 8-bit binary (encoder and decoder keeps data unmodified)
base1, 1, unary (11111)
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
```

These encodings are being considered:
Expand Down
41 changes: 23 additions & 18 deletions multibase.csv
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
encoding, code, name
identity, 0x00, 8-bit binary (encoder and decoder keeps data unmodified)
base1, 1, unary tends to be 11111
base2, 0, binary has 1 and 0
base8, 7, highest char in octal
base10, 9, highest char in decimal
base16, Ff, highest char in hex
base32hex, Vv, rfc4648 no padding - highest char
base32hexpad, Tt, rfc4648 with padding
base32, Bb, rfc4648 no padding
base32pad, Cc, rfc4648 with padding
base32z, h, z-base-32 - used by Tahoe-LAFS - highest letter
base58flickr, Z, highest letter
base58btc, z, highest letter
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
identity, 0x00, 8-bit binary (encoder and decoder keeps data unmodified)
base1, 1, unary (11111)
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
10 changes: 5 additions & 5 deletions tests/test1.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ base2, "001000100011001010110001101100101011011100111010001110010011000010110110
base8, "71043126154533472162302661513646244031273145344745643206455631620441"
base10, "9429328951066508984658627669258025763026247056774804621697313"
base16, "f446563656e7472616c697a652065766572797468696e672121"
BASE16, "F446563656E7472616C697A652065766572797468696E672121"
base16upper, "F446563656E7472616C697A652065766572797468696E672121"
base32, "birswgzloorzgc3djpjssazlwmvzhs5dinfxgoijb"
BASE32, "BIRSWGZLOORZGC3DJPJSSAZLWMVZHS5DINFXGOIJB"
base32upper, "BIRSWGZLOORZGC3DJPJSSAZLWMVZHS5DINFXGOIJB"
base32hex, "v8him6pbeehp62r39f9ii0pbmclp7it38d5n6e891"
BASE32HEX, "V8HIM6PBEEHP62R39F9II0PBMCLP7IT38D5N6E891"
base32hexupper, "V8HIM6PBEEHP62R39F9II0PBMCLP7IT38D5N6E891"
base32pad, "cirswgzloorzgc3djpjssazlwmvzhs5dinfxgoijb"
BASE32PAD, "CIRSWGZLOORZGC3DJPJSSAZLWMVZHS5DINFXGOIJB"
base32padupper, "CIRSWGZLOORZGC3DJPJSSAZLWMVZHS5DINFXGOIJB"
base32hexpad, "t8him6pbeehp62r39f9ii0pbmclp7it38d5n6e891"
BASE32HEXPAD, "T8HIM6PBEEHP62R39F9II0PBMCLP7IT38D5N6E891"
base32hexpadupper, "T8HIM6PBEEHP62R39F9II0PBMCLP7IT38D5N6E891"
base32z, "het1sg3mqqt3gn5djxj11y3msci3817depfzgqejb"
base58flickr, "Ztwe7gVTeK8wswS1gf8hrgAua9fcw9reboD"
base58btc, "zUXE7GvtEk8XTXs1GF8HSGbVA9FCX9SEBPe"
Expand Down
10 changes: 5 additions & 5 deletions tests/test2.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ base2, "001111001011001010111001100100000011011010110000101101110011010010010000
base8, "7171312714403326055632220041"
base10, "9573277761329450583662625"
base16, "f796573206d616e692021"
BASE16, "F796573206D616E692021"
base16upper, "F796573206D616E692021"
base32, "bpfsxgidnmfxgsibb"
BASE32, "BPFSXGIDNMFXGSIBB"
base32upper, "BPFSXGIDNMFXGSIBB"
base32hex, "vf5in683dc5n6i811"
BASE32HEX, "VF5IN683DC5N6I811"
base32hexupper, "VF5IN683DC5N6I811"
base32pad, "cpfsxgidnmfxgsibb"
BASE32PAD, "CPFSXGIDNMFXGSIBB"
base32padupper, "CPFSXGIDNMFXGSIBB"
base32hexpad, "tf5in683dc5n6i811"
BASE32HEXPAD, "TF5IN683DC5N6I811"
base32hexpadupper, "TF5IN683DC5N6I811"
base32z, "hxf1zgedpcfzg1ebb"
base58flickr, "Z7Pznk19XTTzBtx"
base58btc, "z7paNL19xttacUY"
Expand Down
10 changes: 5 additions & 5 deletions tests/test3.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ base2, "001101000011001010110110001101100011011110010000001110111011011110111001
base8, "7064145330661571007355734466144"
base10, "9126207244316550804821666916"
base16, "f68656c6c6f20776f726c64"
BASE16, "F68656C6C6F20776F726C64"
base16upper, "F68656C6C6F20776F726C64"
base32, "bnbswy3dpeb3w64tmmq"
BASE32, "BNBSWY3DPEB3W64TMMQ"
base32upper, "BNBSWY3DPEB3W64TMMQ"
base32hex, "vd1imor3f41rmusjccg"
BASE32HEX, "VD1IMOR3F41RMUSJCCG"
base32hexupper, "VD1IMOR3F41RMUSJCCG"
base32pad, "cnbswy3dpeb3w64tmmq======"
BASE32PAD, "CNBSWY3DPEB3W64TMMQ======"
base32padupper, "CNBSWY3DPEB3W64TMMQ======"
base32hexpad, "td1imor3f41rmusjccg======"
BASE32HEXPAD, "TD1IMOR3F41RMUSJCCG======"
base32hexpadupper, "TD1IMOR3F41RMUSJCCG======"
base32z, "hpb1sa5dxrb5s6hucco"
base58flickr, "ZrTu1dk6cWsRYjYu"
base58btc, "zStV1DL6CwTryKyV"
Expand Down
10 changes: 5 additions & 5 deletions tests/test4.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ base2, "000000000011110010110010101110011001000000110110101100001011011100110100
base8, "7000171312714403326055632220041"
base10, "90573277761329450583662625"
base16, "f00796573206d616e692021"
BASE16, "F00796573206D616E692021"
base16upper, "F00796573206D616E692021"
base32, "bab4wk4zanvqw42jaee"
BASE32, "BAB4WK4ZANVQW42JAEE"
base32upper, "BAB4WK4ZANVQW42JAEE"
base32hex, "v01smasp0dlgmsq9044"
BASE32HEX, "V01SMASP0DLGMSQ9044"
base32hexupper, "V01SMASP0DLGMSQ9044"
base32pad, "cab4wk4zanvqw42jaee======"
BASE32PAD, "CAB4WK4ZANVQW42JAEE======"
base32padupper, "CAB4WK4ZANVQW42JAEE======"
base32hexpad, "t01smasp0dlgmsq9044======"
BASE32HEXPAD, "T01SMASP0DLGMSQ9044======"
base32hexpadupper, "T01SMASP0DLGMSQ9044======"
base32z, "hybhskh3ypiosh4jyrr"
base58flickr, "Z17Pznk19XTTzBtx"
base58btc, "z17paNL19xttacUY"
Expand Down
10 changes: 5 additions & 5 deletions tests/test5.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ base2, "000000000000000000111100101100101011100110010000001101101011000010110111
base8, "700000171312714403326055632220041"
base10, "900573277761329450583662625"
base16, "f0000796573206d616e692021"
BASE16, "F0000796573206D616E692021"
base16upper, "F0000796573206D616E692021"
base32, "baaahszltebwwc3tjeaqq"
BASE32, "BAAAHSZLTEBWWC3TJEAQQ"
base32upper, "BAAAHSZLTEBWWC3TJEAQQ"
base32hex, "v0007ipbj41mm2rj940gg"
BASE32HEX, "V0007IPBJ41MM2RJ940GG"
base32hexupper, "V0007IPBJ41MM2RJ940GG"
base32pad, "caaahszltebwwc3tjeaqq===="
BASE32PAD, "CAAAHSZLTEBWWC3TJEAQQ===="
base32padupper, "CAAAHSZLTEBWWC3TJEAQQ===="
base32hexpad, "t0007ipbj41mm2rj940gg===="
BASE32HEXPAD, "T0007IPBJ41MM2RJ940GG===="
base32hexpadupper, "T0007IPBJ41MM2RJ940GG===="
base32z, "hyyy813murbssn5ujryoo"
base58flickr, "Z117Pznk19XTTzBtx"
base58btc, "z117paNL19xttacUY"
Expand Down
10 changes: 5 additions & 5 deletions tests/test6.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
non-canonical encoding, "hello world"
base16, "f68656c6c6f20776F726C64"
BASE16, "F68656c6c6f20776F726C64"
base16upper, "F68656c6c6f20776F726C64"
base32, "bnbswy3dpeB3W64TMMQ"
BASE32, "Bnbswy3dpeB3W64TMMQ"
base32upper, "Bnbswy3dpeB3W64TMMQ"
base32hex, "vd1imor3f41RMUSJCCG"
BASE32HEX, "Vd1imor3f41RMUSJCCG"
base32hexupper, "Vd1imor3f41RMUSJCCG"
base32pad, "cnbswy3dpeB3W64TMMQ======"
BASE32PAD, "Cnbswy3dpeB3W64TMMQ======"
base32padupper, "Cnbswy3dpeB3W64TMMQ======"
base32hexpad, "td1imor3f41RMUSJCCG======"
BASE32HEXPAD, "Td1imor3f41RMUSJCCG======"
base32hexpadupper, "Td1imor3f41RMUSJCCG======"

0 comments on commit 2d10836

Please sign in to comment.