Next steps for Inform 6 compiler

I make a few assumptions here:

  1. That text compression are most valuable when you’re trying to fit games to 8-bit scene. For other formats you have 512kB (Z8) or 2MB (Glulx) and I don’t know of any game that have used this much text.
  2. The Z-machine standard is “fixed”. Meaning that no decompressing is done by the interpreter. Otherwise the use for compressing with LZ77 would be unusable because there exists no interpreter that could decompress the text.
  3. LZ77 with rolling buffer is not feasable because there is not enough memory available to allocate a buffer of usable size.

Routines as you suggest sounds to me to introduce quite a bit overhead, but I don’t know how much. Remember that ZASCII use 5 bits for each character and bunch them together in 2 bytes that contains 3 characters so each string are optimally of a length dividable by 3. When I run extraction of abbreviations of Z3-files the last abbreviations found (abbrev 80 - 96) are often small saves, usally under 75 bytes each. The escape-char to insert an abbreviation is quite small and if you replace an abbreviation with a CONSTANT or a GLOBAL the savings are often lost because the escape for these costs more and the replacement abbreviations that are found can’t compensate for this.

I’m having a hard time seeing how a compress/decompress without z-machine support and a rolling buffer could save much more space than the current system with abbreviations does. 96 abbreviations are a bit limiting but could be extended by using CONSTANTs and/or GLOBALs for common phrases. See the work that was done with Mini-Zork II over in this thread.

Am I missing something obvious?

2 Likes