Spent most of my work time last week deciphering Delphine’s compression format. Now I feel satisfied by having made the implementation in ScummVM’s Cine-engine quite robust and hopefully understandable too (I documented it and really made myself understand what the darn thing does).
The decompression code had been initially reverse engineered from disassembly by someone else and there were no comments to speak of so that’s why it wasn’t very understandable to me in the beginning. Just compare the older version that I started with (Header file & code file) with the version that’s now in place (Header file & code file).
I also wrote documentation for the compression format to ScummVM’s wiki (Look there if you want to intimately know how the compression format works).
So in the end it turned out the compression algorithm used by Delphine’s adventure games uses sliding window compression (Quite like LZ77) combined with a fixed non-adaptive entropy coding scheme (Not of any type I could recognize).
Now to use the decompressor and unpack all those scripts and do the comparison…
P.S. Oh, and I also tried IDA’s graph view for the first time and worked with it on Delphine’s unpacking routine’s disassembly. Here’s an image of the abstracted graph of the unpacking function.