What is encoding = base64 compression = gzip? And how to decode

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
luatsenpai
Posts: 20
Joined: Sun Mar 18, 2018 8:55 am

What is encoding = base64 compression = gzip? And how to decode

Post by luatsenpai »

Hello there
I found .tmx file anh try open it and i found something like:
data encoding="base64" compression="gzip"
H4sIAAAAAAAAA+3QQQ6AIAxEUW6pO3v/U+jCVROGoomj8b+EsKPltwYA+LrVvYAQ7gWEJ7st57zencVxtuJ91+z76h+jf82i23Vv7Taal9GtNi9zd1OiebspdOvPU9zdql0c3apd/t4NAABoOy44SJzEFwAA
How to read it?
Endymion
Posts: 2
Joined: Wed Mar 20, 2019 7:50 pm

Re: What is encoding = base64 compression = gzip? And how to decode

Post by Endymion »

as it implies, this is some kind of data that to me looks like random letters here and there, first gzipped then base64-ed. So not sure there's anything human-readable inside.
atom0s
Posts: 250
Joined: Sat Dec 27, 2014 8:49 pm

Re: What is encoding = base64 compression = gzip? And how to decode

Post by atom0s »

You can use online tools to do this but the data returned is not just normal text data, it is a binary file for mapping a layer/floor from the look of it.

To do this easily, create a new text file on your desktop like data.txt
Open and paste the base64 string into it like:

Code: Select all

H4sIAAAAAAAAA+3QQQ6AIAxEUW6pO3v/U+jCVROGoomj8b+EsKPltwYA+LrVvYAQ7gWEJ7st57zencVxtuJ91+z76h+jf82i23Vv7Taal9GtNi9zd1OiebspdOvPU9zdql0c3apd/t4NAABoOy44SJzEFwAA


Use the file decode tool here: https://www.base64decode.org/ and decode the data.txt file.

Save the new file it made to your desktop but rename the extension to .gzip

Load the new file with a tool like 7zip. That can decompress and read the file inside. Open that in a hex editor and you'll have the real data.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: What is encoding = base64 compression = gzip? And how to decode

Post by aluigi »

If you need a quickbms script as example:

Code: Select all

comtype base64
get SIZE asize
clog MEMORY_FILE 0 SIZE SIZE
comtype gzip
get SIZE asize MEMORY_FILE
get NAME basename
clog NAME 0 SIZE SIZE MEMORY_FILE