Now for some understanding of it, because we (at the wiki) still have some specs to write. Could you at least point out how the RA files are made up and what specific parts we can distinguish?
I'll try to write some rough specs later.
Essentially it reads a byte as bitbuffer, and reads bits from this. If all 8 bits are used, it reads another byte. Depending on the bits it does more processing. In the end, it's one of two modes:
1. copy raw bytes from the input to the output
2. copy a number bytes from some offset in the output to the current offset into the output
The copy counts, lengths and offsets are calculated via the tables (lengthTable etc.)
Is a compressor also possible, by the way? I assume so, but I first'd have to understand what is going on.
Yes, that should be possible. I still don't know how this table stuff works exactly, figuring that out is needed to make a compressor. It's probably some Huffman type, not sure.
Probably an existing LZ-compresser could be adjusted to create files in the RA format.
Oh, and the header for a RA file looks like this:
1 word id, "RA"
1 word version number, always 2
1 dword size of decompressed data
1 word unknown (unused in decompressor code)
1 word checksum of the decompressed data