From 2d108367e5e3d30c9e3f23475420c242ff8411c8 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 15 Nov 2018 11:15:39 -0800 Subject: [PATCH] update table to better match the table in multicodec --- README.md | 41 +++++++++++++++++++++++------------------ multibase.csv | 41 +++++++++++++++++++++++------------------ tests/test1.csv | 10 +++++----- tests/test2.csv | 10 +++++----- tests/test3.csv | 10 +++++----- tests/test4.csv | 10 +++++----- tests/test5.csv | 10 +++++----- tests/test6.csv | 10 +++++----- 8 files changed, 76 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index a6144a6..d34ef20 100644 --- a/README.md +++ b/README.md @@ -40,24 +40,29 @@ Where `` 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: diff --git a/multibase.csv b/multibase.csv index 846dc31..718e502 100644 --- a/multibase.csv +++ b/multibase.csv @@ -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 diff --git a/tests/test1.csv b/tests/test1.csv index 3916610..44d6003 100644 --- a/tests/test1.csv +++ b/tests/test1.csv @@ -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" diff --git a/tests/test2.csv b/tests/test2.csv index b878ddb..97ecccb 100644 --- a/tests/test2.csv +++ b/tests/test2.csv @@ -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" diff --git a/tests/test3.csv b/tests/test3.csv index f123426..4bfbc5e 100644 --- a/tests/test3.csv +++ b/tests/test3.csv @@ -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" diff --git a/tests/test4.csv b/tests/test4.csv index a4cee2e..e02f128 100644 --- a/tests/test4.csv +++ b/tests/test4.csv @@ -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" diff --git a/tests/test5.csv b/tests/test5.csv index 6869a69..9f70104 100644 --- a/tests/test5.csv +++ b/tests/test5.csv @@ -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" diff --git a/tests/test6.csv b/tests/test6.csv index 0dd4fc0..a10b180 100644 --- a/tests/test6.csv +++ b/tests/test6.csv @@ -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======"