DESCRIPTION
-----------
This archive contains a simple and readable ANSI C library implementing
in-memory LZSS encoding and decoding.  This is a variation of my basic LZSS
library which replaces files with arrays of unsigned characters.  It is designed
for use in environments without file systems.  This implementation is not
intended to be the best, fastest, smallest, or any other performance related
adjective.

Included in this library are sample programs demonstrating the usage of the
encode and decoding routines.  The library has been designed so that it may
be linked with different sliding window search routines which can speed up
the compression time at the cost of additional memory space.

More information on LZSS encoding may be found at:
http://www.datacompression.info/LZSS.shtml

FILES
-----
COPYING         - Rules for copying and distributing LGPL software
arraystream.c   - Library to allow bitwise reading and writing using arrays.
arraystream.h   - Header for arraystream library.
brute.c         - File implementing brute force search for strings matching the
                  strings to be encoded.
comp.c          - Simple example of a compression only program.
decomp.c        - Simple example of a decompression only program.
hash.c          - File implementing hash table search for strings matching the
                  strings to be encoded.
LICENSE         - GNU Lesser General Public License
list.c          - File implementing linked list indexed search for strings
                  matching the strings to be encoded.
lzlocal.h       - Header file defining interface to be used by files
                  implementing searches for strings matching strings to be
                  encoded.
lzdecode.c      - LZSS decoding source
lzencode.c      - LZSS encoding source
lzss.h          - LZSS encoding/decoding header files
lzvars.c        - Variables used by both lzencode and lzdecode
Makefile        - makefile for this project (assumes gcc compiler and GNU make)
README          - this file

BUILDING
--------
To build these files with GNU make and gcc:
1. Edit the variable FMOBJ to choose the version of find match which
   will be used.
2. Windows users should define the environment variable OS to be Windows or
   Windows_NT.  This is often already done.
3. Enter the command "make" from the command line.

USAGE
-----
To compress files:
comp <input file> <compressed output file>

To decompress files:
decomp <compressed input file> <decompressed output file>

HISTORY
-------
11/24/03  - Initial release
12/10/03  - Changed handling of sliding window to better match standard
            algorithm description.
12/11/03  - Added version with linked lists to speed up encode.
12/12/03  - Added version with hash table to speed up encode.
02/21/04  - Major changes:
            * Separated encode/decode, match finding, and main.
            * Use bitfiles for reading/writing files
            * Use traditional LZSS encoding where the coded/uncoded bits
              precede the symbol they are associated with, rather than
              aggregating the bits.
11/08/04  - Major changes:
            * Split encode and decode routines for to allow for separate
              linking (see comp.c and decomp.c)
            * Makefile now builds code as libraries.  This should make LGPL
              compliance a bit easier.
            * Upgraded to latest bitfile library.
            * Add the option to pass compression/decompression routines file
              pointers instead of file names.
11/28/04  - Array based code forked from file based implementation.

TODO
----
- Replace sequential string search with a multi-level hash and tree searches.

AUTHOR
------
Michael Dipperstein (mdipper@cs.ucsb.edu)
