Zlib for CircleMUD package.

From: George (greerga@circlemud.org)
Date: 02/27/99


        zlib3.patch     21,348 bytes

        zlib3.tar.gz    26,285 bytes
                Includes above patch, new configure, and conf.h

Now the compression support for CircleMUD should be basically completed.
Instead of the old hidden menu '6' I had while testing, there are two new
commands, 'autocompress' and 'compress' which control how the MUD works
with the client.  The 'autocompress' preference flag will cause the MUD to
automatically enable compression with the client upon log in, but only if
the client says it can handle it. The command 'compress' can be used to
toggle between the two states while in the game, but again, the MUD will
not enable support unless the client has previously responded to the IAC
(Interpret As Command, telnet communication) query for compression.

This has only been tested in Unix, Linux specifically.  Zlib is usable
under Windows (DOS even), but I will not write support for it as I don't
have/use Windows (Linux desktop computer).  If someone else wishes to then
feel free. The code may actually work as-is with Zlib for Windows/DOS but I
wouldn't bet money on it.

NOTE: I have not run the configure or conf.h.in included with the .tar.gz
file.  While I believe they will work just fine, I haven't tried. (Diff
them against the originals, it's a pretty trivial change.)

That said, let me know how it goes if you install it. I know I have to make
two cosmetic changes to the code and add a few comments so this won't be
the final version of it. I plan to have it installed in CircleMUD (with
Jeremy's approval) but it shouldn't differ too greatly.

BTW, if someone figures out how to test this section of code:

      /* Oops. This shouldn't happen, I hope. -gg 2/19/99 */
      if (result <= 0) {
        log("SYSERR: process_output: Blocked write during compression. Error code %d.", result);
        log("SYSERR: process_output: Let <greerga@circlemud.org> know how it fares.");

please let me know. Due to the compression I had a really hard time of
making that condition happen.  A full screen of 'where' output that filled
a large outbuf only took about 500 bytes when compressed.  It was an
admittedly contrived test, but I couldn't overflow it...

George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://mouse.van.m-l.org/  (mostly) | stupidity is not thus handicapped.
http://www.van.m-l.org/CircleMUD/   |                  -- Elbert Hubbard

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |

This archive was generated by hypermail 2b30 : 12/15/00 PST