Community

SCI Programming => SCI Development Tools => Topic started by: Charles on January 12, 2024, 02:26:29 PM

Title: RESOURCE.000 compression/decompression algorithms
Post by: Charles on January 12, 2024, 02:26:29 PM
I'm writing my own resource viewer for funsies and I'm hung up on the compression methods and algorithms used on some of the patch files.  The info on the scummvm documentation https://wiki.scummvm.org/index.php?title=SCI/Specifications/Resource_files/Decompression_algorithms (https://wiki.scummvm.org/index.php?title=SCI/Specifications/Resource_files/Decompression_algorithms) and sierrahelp documentation http://sci.sierrahelp.com/Documentation/SCISpecifications/10-DecompressionAlgorithms.html (http://sci.sierrahelp.com/Documentation/SCISpecifications/10-DecompressionAlgorithms.html) seems to be identical and outdated (or incomplete?).

Obviously these are solved problems, because ScummVM can play the games, and SCICompanion can edit them, etc, but would somebody be able to point me to the code in either of those two github repositories where I could follow along?
Title: Re: RESOURCE.000 compression/decompression algorithms
Post by: Kawa on January 12, 2024, 02:47:19 PM
VersionAndCompressionNumberToAlgorithm @ https://github.com/Kawa-oneechan/SCICompanion/blob/master/SCICompanionLib/Src/Resources/ResourceBlob.cpp#L209C43-L209C43 maps compression type IDs to their respective enum values.
ResourceBlob::_EnsureDecompressed @ https://github.com/Kawa-oneechan/SCICompanion/blob/master/SCICompanionLib/Src/Resources/ResourceBlob.cpp#L282 can lead you to their respective decompression functions.
Title: Re: RESOURCE.000 compression/decompression algorithms
Post by: Charles on January 12, 2024, 03:08:47 PM
Thank you very much!  I'll check that out tonight. :D
Title: Re: RESOURCE.000 compression/decompression algorithms
Post by: Collector on January 12, 2024, 05:58:00 PM
The SCI specifications in the Wiki is from the old FreeSCI documentation. If you find inaccuracies or incomplete information feel  free to update the Wiki.