Unknown compression algorithm. [05 00 00 00, Prince of Persia: Warrior Within]

Codecs, formats, encoding/decoding of game audio, video and music
R4nger
Posts: 13
Joined: Mon Oct 29, 2018 6:19 pm

Unknown compression algorithm. [05 00 00 00, Prince of Persia: Warrior Within]

Post by R4nger »

Hello ZenHAX users!

I have been attempting to extract an archive with .wav files in it, however when I extracted it I found it is sped up (even with correct bits and freq) and covered up with static, so I came to the conclusion it is compressed. I first checked the quickbms algo identifying page, however, I didnt find any reference to the bytes at the start of the file. Theres two files (one with extension .ss0 and one with .sl0, but both serve the same purpose) with the first 4 bytes being the same so I am assuming that the comtype for them is the same, there is also no uncompressed size for these files.

These first four bytes are essentially 0x05 or 05 00 00 00 (little endianness)

If this is a very simple thing than I'm sorry however I couldn't find it anywhere else. :D
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unknown compression algorithm. [05 00 00 00]

Post by aluigi »

I suggest you to provide a sample file and moreover the name of this game/software.
R4nger
Posts: 13
Joined: Mon Oct 29, 2018 6:19 pm

Re: Unknown compression algorithm. [05 00 00 00]

Post by R4nger »

The game is Prince of Persia: Warrior Within. The file structure (offset, size, etc.) is stored in a separate .sb0 file. Sample file and mentioned .sb0 stored below, their original extension is in the file name. (The orignal stream.ls0 was 108Mb, so I just cut a big chunk of it leaving a 5Mb one.)
R4nger
Posts: 13
Joined: Mon Oct 29, 2018 6:19 pm

Re: Unknown compression algorithm. [05 00 00 00]

Post by R4nger »

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

Re: Unknown compression algorithm. [05 00 00 00, Prince of Persia: Warrior Within]

Post by aluigi »

Nothing that rings any bell in my mind.
I can see the compressed size (0x15a43) of the first file in SB0 but still no idea about the algorithm or where the raw compressed data should really start (offset 0x30?).
bnnm
Posts: 13
Joined: Mon Nov 06, 2017 8:24 pm

Re: Unknown compression algorithm. [05 00 00 00, Prince of Persia: Warrior Within]

Post by bnnm »

You can play those files with vgmstream: https://hcs64.com/vgmstream.html

Open the .sb0 with foobar+vgmstream plugin for instance, and all subsongs will be unpacked and playable.
R4nger
Posts: 13
Joined: Mon Oct 29, 2018 6:19 pm

Re: Unknown compression algorithm. [05 00 00 00, Prince of Persia: Warrior Within]

Post by R4nger »

Well yes, but the main reason I wanna extract them with QBMS is so I can repack them again.
R4nger
Posts: 13
Joined: Mon Oct 29, 2018 6:19 pm

Re: Unknown compression algorithm. [05 00 00 00, Prince of Persia: Warrior Within]

Post by R4nger »

While DecUbiSnd provides valuable insight into the different formats of Ubisoft, im having a very hard time actually reading the source code into how the program decompresses it.
However if it helps the .ls0 file is a Version 5 type of format.
Sonderhen
Posts: 17
Joined: Sat Jun 15, 2019 1:06 am

Re: Unknown compression algorithm. [05 00 00 00, Prince of Persia: Warrior Within]

Post by Sonderhen »

Hello, I Trying replace audio files inside stream.ls0

I can extract these audios with "Decode Ubisoft Sounds" but i cannot replace the audios.

someone can help me?