sources.txt - Don Yang (uguu.org) 09/15/01 This file describes the differences between sources in each directory. ./ Final version, each file represents a preprocessing stage. These files are write only, meaning it was very easy to write them, but near impossible to figure out what they were doing. You are better off looking at one of the subdirectories. v1/ Original encoder, for proof of correctness. This encoder does not implement the patching algorithm. Because of the use of fileno, encode.c and decode.c are not ANSI compliant. They pass lclint 2.5q otherwise (use +posixlib option). Both encoder and decoder runs without arguments. If the first command line argument is present and it's not '-', it reads input from the named file instead of stdin. If second argument is present, it writes output to that file instead of stdout. If stdout is not redirected to a file (i.e. it's a tty device), program will run in debug mode. Reading/writing files is the preferred mode of operation, especially under windows, since it translates every \n to \r\n. I tried pretty hard to reopen stdin/stdout in binary mode with no success :P Design for this version is covered in design0.txt. v2/ Second version, with the patching algorithm. Same input/output parameters as above. Design for this version is covered in design0.txt. v3/ This version uses the current design, in design.txt. Comes with a few optimizations, and no more patch bytes. Tag that was used for patch bytes are now used for Huffman blocks. stdin/stdout are now opened as binary under win32. v4/ This version adds a superior substring matching algorithm. Emperical tests showed this version to be about 5 times faster than last version ^_^ v5/ Last human readable version. Huffman tree is limited to 7bits, and sources are merged to one file. Debug encoder/decoders are also removed (the source is once again ansi compliant). There are no more algorithm changes after this version. Command line: kirika0 x Decode stdin to stdout kirika0 x infile Decode infile to stdout kirika0 x infile outfile Decode infile to outfile kirika0 a Encode stdin to stdout kirika0 a infile Encode infile to stdout kirika0 a infile outfile Encode infile to outfile 'x' was chosen as the decompress switch since unrar and unace both use it. It was set to 'd' earlier, which has the association (for me at least) to delete files, while 'x' sounded more like 'extract', so there. Program only recognizes lowercase 'x', any other flag cause it to run in encode mode. huffman/ Huffman encoder/decoder/tree generator. tests/ Correctness test scripts (Unix only!)