Results 1 to 5 of 5

Thread: Unknown Compression From PS3 Game

  1. #1
    Member
    Join Date
    Jul 2019
    Location
    Somewhere
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Unknown Compression From PS3 Game

    Hello everyone,

    I am trying to figure out a compression used in a PS3 game (2010). Unfortunately I don't have the decompressed data which makes it harder, but I believe it is an already known compression method. So I thought maybe someone more experienced would be able to spot it from the header, flags, general look etc.

    Here is what I have so far. Byte order is big-endian (due to PS3). Compressed data blocks have the "cpx\0" magic. Then comes 0x80 0x20 always. 2 bytes for chunk count (compressed data seems to be divided into chunks). 4 bytes total compressed size. 4 bytes total decompressed size. Then there are 4 byte offsets (from cpx magic) for chunk start positions. It is 4 bytes * chunk count. After that starts the actual data.


    Name:  ps3-data.png
Views: 205
Size:  28.1 KB


    I have also attached couple of data samples with different chunk counts. I appreciate any kind of help or idea. Thank you.
    Attached Files Attached Files

  2. #2
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    4,008
    Thanks
    301
    Thanked 1,324 Times in 757 Posts
    I wonder if this is related? https://zenhax.com/viewtopic.php?f=9&t=8405
    For now I can only say that it has some bitwise entropy coding (bit7 to 0 order).

  3. Thanks:

    rhysling (6th November 2020)

  4. #3
    Member
    Join Date
    Jul 2019
    Location
    Somewhere
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks for taking a look. Yes, it is from the same developer, so the compression is most likely the same. The zenhax thread was bit of a dead end, that's why I wanted to ask here. It is possible to parse the archives and extract files, but no solution for the compressed parts.

    I will do some research on entropy coding you mentioned. Every info is valuable, so that I can narrow down the possibilities I will also try to get the decompressed data via ram dump or something.

  5. #4
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    4,008
    Thanks
    301
    Thanked 1,324 Times in 757 Posts
    > The zenhax thread was bit of a dead end, that's why I wanted to ask here.

    Aside from me, its unlikely that anybody would answer here.
    I guess you can also try asking on http://krinkels.org/
    Or PM some people from that thread on zenhax.

    > I will do some research on entropy coding you mentioned.

    Its not a specific coding method.
    I'm just saying that its not a byte-aligned format, and not arithmetic coding.
    And doesn't look like huffman either - too redundant.
    Might be LZW or LZ77 with rice codes or something - too many options.

    > I will also try to get the decompressed data via ram dump or something.

    It would also help If you can find the decoding function - we can try feeding it to decompiler.

  6. #5
    Member
    Join Date
    Jul 2019
    Location
    Somewhere
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Shelwien View Post
    Might be LZW or LZ77 with rice codes or something - too many options.
    Indeed. I was expecting them to use something common from 2010 era tbh, but I guess this is somewhat custom. I have tried bruteforcing compressions with quickbms, but nothing seemed correct.
    ‚Äč
    Quote Originally Posted by Shelwien View Post
    It would also help If you can find the decoding function - we can try feeding it to decompiler.
    I was also thinking about this, but not sure how I can debug ps3 games. I was barely able to find some functions from pc executables using IDA before I guess I will have to use the debugger of the emulator for this. I will give it a try.

Similar Threads

  1. Replies: 13
    Last Post: 13th October 2017, 21:43
  2. Identifying unknown compression
    By McGee in forum Data Compression
    Replies: 1
    Last Post: 28th October 2015, 23:18
  3. Help with unknown compression. Maybe LZMA?
    By twisted89 in forum Data Compression
    Replies: 0
    Last Post: 29th November 2012, 12:11
  4. Replies: 6
    Last Post: 24th April 2012, 14:50
  5. Unknown compression.
    By yjme in forum Data Compression
    Replies: 7
    Last Post: 21st January 2011, 12:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •