Talk:RES Format (Stellar 7)
Compression
I was able to get an LZW decompressor working beautifully up until some time after code reset 0x100 is encountered. I'm using this source with some compatibility fixes. I'm wondering how much is known about discarding bytes. Using LEVEL1.RES for example, the third compressed block has a code reset about 2/3rds of the way through the finished product. I can finish the decoding if I eat three bytes but the remaining image starts becoming corrupted. The eaten bytes don't look useless either; even the remaining 8 bits in the buffer produce what looks like the next palette number in the output. Any thoughts? Zab 18:31, 3 March 2012 (GMT)
- I don't know much about LZW decompression, but in my limited experience there are a bunch of different things that can happen. If 0x100 is a reset sequence, it may not reset the entire dictionary. Upon a reset, the length of the codeword may or may not be restored to its initial length (i.e. if it starts at 9-bits and grows to 12-bits, upon reset it may go back to 9-bits or stay at 12-bits.) There are other things I can't think of right now too. If you can find an already decompressed file and then compare that byte by byte to the compressed data as it is being decompressed, you will know at exactly which byte it goes wrong, and what byte it should have been instead, which could provide some hints. -- Malvineous 13:16, 6 March 2012 (GMT)
- I've pounded my head on this plenty. I won't say I've given up but I'm going to put this up in case anyone can help out. Here is the decompression code and two compressed files, both working and non-working with a decompressed size of 32,000 bytes. Any assistance is appreciated. Zab 08:42, 27 March 2012 (GMT)
- I found a decompressor for the Sierra/Dynamix LZW stuff at the VOGONS forum. It's only decompression, though, which is a pity since I wanted both. Someone in that thread also figured out that the compression format 0x03, used in some of their later games, is LZSHuf -Nyerguds (talk) 09:09, 27 January 2020 (UTC)
Cleanup / split
This page should probably be renamed, and be split into separate articles. It describes formats (including RES itself) used throughout all Sierra/Dynamix games, not just Stellar 7, and contains information on a load of very different file formats. "RES Format (Sierra/Dynamix)" would probably be a much better name.
In fact, a separate page for the generally-used Dynamix chunks system could be useful too.