I recently was linked to CCG Workshop which is a site where you can play collectable card games (CCGs) online. It’s interesting because they have this gatlingEngine software, which apparently runs the game for you using a set of rules in a gatlingML file.
I thought this would be a wonderful chance to document the rules for the Love Hina CCG, which I never finished translating as you can see, but the gatlingDevKit and all the developer documentation requires that you sign an NDA and suchlike.
Discussions on the forum (the developers talk openly on the public forum, so I have an idea what’s not under NDA ^_^) indicated the gatlingML files were XML, but when I got one while trying to play a game, it was quite clearly binary.
The first four bytes are !HZL which I thought looked really familiar, but it took a fair while before I clicked that that was “LZH!” backwards, LZH being the compression algorithm used in the LHA family of archivers. Of course, research indicated that none of the LHA family of archivers actually wrote a file with !HZL at the front.
Poking about some more, I noticed that the gatlingEngine is written in Delphi (and is legacy code anyway) and went looking for Delphi compression libraries. Thankfully, the vast majority do PKZIP-compatible compression, and the first one I tried that supported LZH compression was Tlzrw1. (Apologies for the quality of the link, the 1998 link in the read file is dead, and the Wayback machine record for it indicates that the author’s page didn’t mention the library anyway) So I note that the library in question attributes its LZH code to LZHUF.C which Google duly turns up for me. I change the code a bit to stop assuming a 16-bit word, handle the header at the front, and suddenly I have a utility which can encode and decode files compressed with the LZH mode of Tlzrw1. (Which has been ported to C# and Delphi.NET, Google tells me.)
Now of course someone needs the interest, gumption and skills needed to produce an open-source program that can process gatlingML files and run games from them. ^_^
Edit: Missing quote put a whole whack of text inside an <a>-tag.