define function before use

This commit is contained in:
Alexandre Detiste 2024-12-21 19:08:16 +01:00
parent 168532de07
commit 7ca3a4c661

View File

@ -13,14 +13,14 @@ chars = b"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
BASE62CHAR = b'[' + chars + b']'
def byteschr(x):
return bytes([x])
vals = b''.join([byteschr(i) for i in range(62)])
c2vtranstable = maketrans(chars, vals)
v2ctranstable = maketrans(vals, chars)
identitytranstable = maketrans(chars, chars)
def byteschr(x):
return bytes([x])
def b2a(os):
"""
@param os the data to be encoded (as bytes)