Important information: this site is currently scheduled to go offline indefinitely by end of the year.

BPE Compression (Needed)

Read or post about compression. And decompression. Or ask questions how to decompress your files.
Post Reply
Racial
n00b
Posts: 11
Joined: Sun Dec 20, 2015 4:51 pm
Has thanked: 6 times

BPE Compression (Needed)

Post by Racial »

Hi everyone, i discovered this type of compression on some games. I go to readable section of process of windows, and found the uncompressed file. So ive got an example of compressed and uncompressed file.

Before the readable section i found a header of 38h bytes that can help to recognise format maybe i will upload here. In this header i see a dh..TBHS and maybe here its the key. Here a picture of this header.

Image

For that i know, compressed files start with
Sng Int of Uncompressed Size (swaped data)
Sng Int of Compressed Size (swaped data)
Type of compression (in all archives got FE 7F on start of it)

I attached the 2 files, compressed and uncompressed one (maybe it can take some bytes changed for be readable, but the size and 99.9% of bytes are ok)
Files C-U .zip
You do not have the required permissions to view the files attached to this post.
Last edited by Racial on Sat May 07, 2016 3:22 am, edited 3 times in total.
The most glorious ideas born of the most humble feathers
Las ideas mas gloriosas salen de las plumas mas humildes.
deepshit
advanced
Posts: 76
Joined: Tue Jan 31, 2012 9:43 pm
Has thanked: 41 times
Been thanked: 30 times

Re: TBHS compression?

Post by deepshit »

The compression is byte pair encoding.
quickbms already supports it.
comp_bpe

And I tested it and it could decompress the example file.
Racial
n00b
Posts: 11
Joined: Sun Dec 20, 2015 4:51 pm
Has thanked: 6 times

Re: TBHS compression?

Post by Racial »

Have you got the scripts for uncompress/compress?

If you cand send me ill be grateful

Thanks :)
The most glorious ideas born of the most humble feathers
Las ideas mas gloriosas salen de las plumas mas humildes.
deepshit
advanced
Posts: 76
Joined: Tue Jan 31, 2012 9:43 pm
Has thanked: 41 times
Been thanked: 30 times

Re: TBHS compression?

Post by deepshit »

Racial
n00b
Posts: 11
Joined: Sun Dec 20, 2015 4:51 pm
Has thanked: 6 times

Re: TBHS compression?

Post by Racial »

Good, thanks again. And sorry if im disturbing
But can you explain to me how you do it to uncompress the example?
I dont know how to use QuickBMS with those files that you give me in the link

What i need to do to uncompress the example and compress the other?
The most glorious ideas born of the most humble feathers
Las ideas mas gloriosas salen de las plumas mas humildes.
deepshit
advanced
Posts: 76
Joined: Tue Jan 31, 2012 9:43 pm
Has thanked: 41 times
Been thanked: 30 times

Re: TBHS compression?

Post by deepshit »

Code: Select all

comtype bpe

get size long
get ZSIZE long

set NAME string "dump"
string NAME += ".dmp"
clog NAME 8 ZSIZE size
I think this should decompress it.
save this code on a txt file.
open quickbms.
select the txt file.
select the compressed data.
select output folder.
done
Racial
n00b
Posts: 11
Joined: Sun Dec 20, 2015 4:51 pm
Has thanked: 6 times

Re: TBHS compression?

Post by Racial »

Perfect, it descompressed the file good. Thanks a lot. :)

What i need to do for compress it again?

I used reimport and put the edited file and the script that you give me, but it doesn't make a new file and tolds me and error in console
The most glorious ideas born of the most humble feathers
Las ideas mas gloriosas salen de las plumas mas humildes.
Post Reply