eduardtomasek / lz-string-python

lz-string for python 3
Do What The F*ck You Want To Public License
31 stars 42 forks source link

Weird error decompressing in base64 #1

Open zahlenteufel opened 9 years ago

zahlenteufel commented 9 years ago

Hi, When I execute in python

a = "N4IgKgTglghgNgBQPZQHYBcQC4DaOCMALPgOwn4AcJFhAnAMwkA0IAVOwAQDK6ME6HdNHgd2rEAF0JAXyAA="
x = lzstring.LZString()
x.decompresFromBase64(a)

it throws me the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "lzstring.py", line 578, in decompresFromBase64
    output += chr(output_ | chr2)
ValueError: chr() arg not in range(256)

But in the javascript implementation it decodes it perfectly.

eduardtomasek commented 9 years ago

Sorry, I did not be here for long time. I tried decompress your string and result is {'TrialPoint': [[1417718784937, '* Start trial *']]}. Is it correct?