Skip to content

Commit 6816da0

Browse files
committed
Improved base
1 parent ab4f810 commit 6816da0

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

codext/base/baseN.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
B1 = {chr(i): chr(i) for i in range(2**8)}
1616
B1[''] = "A"
17-
base(B1, r"^(?:base[-_]?1(|[-_].)|unary)$")
17+
base(B1, r"^(?:base[-_]?1(|[-_].)|unary)$", guess=[])
1818
main1 = main(1)
1919

2020

@@ -82,7 +82,7 @@
8282
r'[-_]?(fl|flickr|short[-]?url|url)$': "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",
8383
}
8484
base(B58, r"^base[-_]?58(|[-_](bc|bitcoin|rp|ripple|fl|flickr|short[-]?url|url))$",
85-
guess=["base58-bitcoin", "base58-ripple", "base58-flickr"])
85+
guess=["base58", "base58-ripple", "base58-flickr"])
8686
main58bc = main(58, "<https://en.bitcoinwiki.org/wiki/Base58>", "bitcoin")
8787
main58rp = main(58, "<https://en.bitcoinwiki.org/wiki/Base58>", "ripple")
8888
main58fl = main(58, "<https://en.bitcoinwiki.org/wiki/Base58>", "flickr")
@@ -117,6 +117,11 @@
117117
main67 = main(67)
118118

119119

120+
B128 = {r'': "".join(chr(i) for i in range(128))}
121+
base(B128, r"^base[-_]?128$", padding_char="=")
122+
main128 = main(128, None, False)
123+
124+
120125
# generic base encodings, to be added after all others as they have the precedence
121126
base_generic()
122127

0 commit comments

Comments
 (0)