BPE Compression

Doubts, help and support about QuickBMS and other game research tools
Racial
Posts: 12
Joined: Thu May 05, 2016 10:53 pm

BPE Compression

Post by Racial »

Solved
Last edited by Racial on Thu Dec 01, 2016 11:41 am, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: BPE compression

Post by aluigi »

quickbms supports the comtype bpe_compress which is just the recompression algorithm of comtype bpe (the known version of Philip Gage).
So if that's the algorithm you are looking for:

Code: Select all

comtype bpe_compress
get SIZE asize
clog "new_file.bpe" 0 SIZE SIZE
Racial
Posts: 12
Joined: Thu May 05, 2016 10:53 pm

Solved

Post by Racial »

Solved
Last edited by Racial on Thu Dec 01, 2016 11:41 am, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: BPE compression

Post by aluigi »

As I told you, the comtype to use is bpe_compress.
The following is a full script for creating a compressed file with the same format:

Code: Select all

comtype bpe_compress
get SIZE asize
clog MEMORY_FILE2 0 SIZE SIZE
get ZSIZE asize MEMORY_FILE2
log MEMORY_FILE 0 0
put SIZE long MEMORY_FILE
put ZSIZE long MEMORY_FILE
append
log MEMORY_FILE 0 ZSIZE MEMORY_FILE2
append
get SIZE asize MEMORY_FILE
get NAME filename
string NAME + ".compressed"
log NAME 0 SIZE MEMORY_FILE
Racial
Posts: 12
Joined: Thu May 05, 2016 10:53 pm

Re: BPE compression

Post by Racial »

I used that script an works. Thanks you very much for your help.

Is there a source code for bpe_compress and bpe (for uncompress) ?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: BPE compression

Post by aluigi »

decompress: http://www.csse.monash.edu.au/cluster/R ... ress/bpd.c
compress: http://www.csse.monash.edu.au/cluster/R ... ress/bpe.c

If you prefer the code that uses the memory instead of file then check src\compression\bpd.c and src\compression\bpe.c in the source code of quickbms: http://aluigi.org/papers/quickbms_src.zip
Destro
Posts: 1
Joined: Thu Jun 29, 2017 7:19 pm

Re: BPE compression

Post by Destro »

aluigi wrote:decompress: http://www.csse.monash.edu.au/cluster/R ... ress/bpd.c
compress: http://www.csse.monash.edu.au/cluster/R ... ress/bpe.c

If you prefer the code that uses the memory instead of file then check src\compression\bpd.c and src\compression\bpe.c in the source code of quickbms: http://aluigi.org/papers/quickbms_src.zip


Sorry, I did not get it. How would a script be built to unzip these files?

download/file.php?id=1195

-------------------------------------------------------
Thanks for leaving the compression script =D

comtype bpe_compress
get SIZE asize
clog MEMORY_FILE2 0 SIZE SIZE
get ZSIZE asize MEMORY_FILE2
log MEMORY_FILE 0 0
put SIZE long MEMORY_FILE
put ZSIZE long MEMORY_FILE
append
log MEMORY_FILE 0 ZSIZE MEMORY_FILE2
append
get SIZE asize MEMORY_FILE
get NAME filename
log NAME 0 SIZE MEMORY_FILE

--------------------------------------------------
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help (solved)

Post by aluigi »

@Racial
please don't edit your first post deleting its content or others people with the same problem will not found the solution. thanks

@Destro
not sure if you found the solution or not, it looks like you used the script I posted so I guess it's solved