Battlefield Hardline (PS3) unknown compression

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Game Ripper
Posts: 123
Joined: Sat Sep 02, 2017 12:56 pm

Battlefield Hardline (PS3) unknown compression

Post by Game Ripper »

Hi, I'm not too experienced with this so that any help will be greatly appreciated!
Long story short: this BF game has both compressed & uncompressed files stored within *.SB/*.TOC pairs and it makes extraction pretty difficult. Almost every single SB archive contains at least 1 such file and the 1st occurrence of it immediately crashes an extractor with this report: "Exception: Unknown compression type 0x02 at OFFSET in NAME.sb".

These are screens of select archives, I highlighted offsets where troublesome compressed files are supposed to start - CommonChunks.sb, FrontEndChunks.sb, PrologueChunks.sb.

Best regards!
cyberspeed
Posts: 104
Joined: Wed Mar 23, 2016 5:11 am

Re: Battlefield Hardline (PS3) unknown compression

Post by cyberspeed »

May I ask why are you struggling to use the PS3 version when PC version is far more easy to deal with, no errors, heck even PS4 is easy to dump same as PC.

Also what are you using for extraction?
Game Ripper
Posts: 123
Joined: Sat Sep 02, 2017 12:56 pm

Re: Battlefield Hardline (PS3) unknown compression

Post by Game Ripper »

Both PC & PS4 versions are too big for me and I'm not even able to download those.
I'm using this.
So long!
cyberspeed
Posts: 104
Joined: Wed Mar 23, 2016 5:11 am

Re: Battlefield Hardline (PS3) unknown compression

Post by cyberspeed »

Thank you for response, well if you care for details in textures and high quality assets in general, over all, then go for PC versions of the games, PS4 too in some cases but PS3 definitely is low and bad in comparison.
All games are fairly easy to access online, just saying ;) I personally recommend retail to avoid errors/corruption and other crap.

BFH sizes:
PC=66.3GB (full game)
PS3=16.3GB (full game)
PS4=41.0GB (data folder only, cant find updates/patches/xpacks)
X360=11.1GB (data folder only, cant find updates/patches/xpacks)

PS, are you the maintainer/creator of those scripts?
Game Ripper
Posts: 123
Joined: Sat Sep 02, 2017 12:56 pm

Re: Battlefield Hardline (PS3) unknown compression

Post by Game Ripper »

If you care for details in textures and high quality assets in general, over all, then go for PC versions of the games, PS4 too in some cases

I only care for sounds & audio from videos but still it depends on every game & its ports: next-gen ones might still use insanely low bitrates for audio; also audio itself might take just a few percents of game size + audio tracks from videos might take only 2-3% of pre-rendered movie size.
Not to mention that bigger filesize doesn't necessarily mean higher quality: Frostbite VGs on PC typically use ADPCM while console versions normally use XMA or EALayer3 & I'd prefer the latter to the former.

Creator of those scripts is Nicknine, he has the same nickname @Discord, ZenHAX, HCS Forum & even Steamcommunity.

Goodbye!
Nicknine
Posts: 18
Joined: Tue May 29, 2018 9:07 pm

Re: Battlefield Hardline (PS3) unknown compression

Post by Nicknine »

The goal here is to identify the compression method used. It *might* be zlib seeing how it was used in Frostbite 2 but that's just a blind guess. From looking at the screenshots, those areas look like correct FB3 payload block headers so 0x02 really is the compression type index and not something else. The reason it's unknown is because this index is not seen in any other game, even frostbite.bms doesn't support it.
Nicknine
Posts: 18
Joined: Tue May 29, 2018 9:07 pm

Re: Battlefield Hardline (PS3) unknown compression

Post by Nicknine »

Looks like this compression type is also encountered in Dragon Age: Inquisition and Plants vs Zombies: Garden Warfare.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Battlefield Hardline (PS3) unknown compression

Post by aluigi »

Frostbite uses the following compression algorithms: zlib, delfate, zstd, oodle and lz4.

They are all very easy to recognize and test.

(I have not checked the topic, I just noticed the "dragon age" and "frostbite" keywords)
Nicknine
Posts: 18
Joined: Tue May 29, 2018 9:07 pm

Re: Battlefield Hardline (PS3) unknown compression

Post by Nicknine »

Yeah, it turned out to be zlib like I predicted. Will add support to the script soon, case closed.