File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ def __init__(self, **kwargs):
21
21
def getBaseValue (alphabet , character ):
22
22
if alphabet not in baseReverseDic :
23
23
baseReverseDic [alphabet ] = {}
24
- for i in range ( len ( alphabet ) ):
25
- baseReverseDic [alphabet ][alphabet [ i ]] = i
24
+ for index , i in enumerate ( alphabet ):
25
+ baseReverseDic [alphabet ][i ] = index
26
26
return baseReverseDic [alphabet ][character ]
27
27
28
28
@@ -405,7 +405,7 @@ def decompressFromUTF16(compressed):
405
405
return ""
406
406
if compressed == "" :
407
407
return None
408
- return _decompress (len (compressed ), 16384 , lambda index : compressed [index ] - 32 )
408
+ return _decompress (len (compressed ), 16384 , lambda index : ord ( compressed [index ]) - 32 )
409
409
410
410
@staticmethod
411
411
def decompressFromBase64 (compressed ):
You can’t perform that action at this time.
0 commit comments