uncompress base64-gzipped string

N

Niels Egberts

I'm creating a game in python and I want to a level editor called
'tiled'. It ouputs a .xml file with base64-gzipped information. Then
every 4 bytes represents a number. See the following link:

http://www.mapeditor.org/wiki/Examining_the_map_format

To start I tried:
code = base64.b64decode("H4sIAAAAAAAAAO3NoREAMAgEsLedAfafE4+s6l0jolNJiif18tt/Fj8AAMC9ARtYg28AEAAA")
code = zlib.decompress(code)

But I get:
zlib.error: Error -3 while decompressing data: incorrect header check

How can I solve this?

Thanks,
Niels.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top