COMPACT Version 1.05 ======= (March 1998) Caution: I assume no liability for any damage that might result from the use of this program. Please contact me, if you discover any problems. Introduction ------------ Compact is a packer for tiny COM-programs of about 2 KByte. In contrast to conventional packers like PKLITE or DIET, COMPACT does not include a huffman coder. This is why the decompression routine, which is being linked into every compressed program, is only 82 Bytes long. Command line syntax: COMPACT The maximum size of Infile is 15000 Bytes. System Requirements ------------------- - MSDOS compatible PC - The compressed programs need at least 33 KByte of RAM, even if its size is much below. The program will quit if there is not enough memory available. How it works ------------ COMPACT is searching for repeated patterns in the program. The lenght of these patterns must be 2 or more bytes. Considering the length and the number of occurrences, one pattern is determined to be replaced by a single byte. The substitute byte is the least frequent byte in the file. The described process is repeated in a recursive iteration until no further gain is possible or any key is pressed. Normally, about 50 passes will be done until the process stops and the compressed file is written. As most of the gain will already be reached after about 20 passes, you can finish compression at any time you like. You can even let the compression be completed next time you're using COMPACT. /|\ program size | 110%|x | x 100%| xx | xxxxx 90%| xxxxxxxxxxxx | xxxxxxxxxxxxxxxxxxx 80%| | | | |--------10--------20--------30--------40--> passes During compression, the current size and some internal information will be displayed for each pass. A highlighted line occures if there was a decrease in the amount of 128- byte-blocks needed to store the program. Note: The more passes are calculated, the longer is the delay during the startup of the compressed program. History: -------- New in version 1.05: Fixed a bug in the last bugfix. New in version 1.04: Fixed a bug which lead to erratic programs in rare cases. New in version 1.03: - Fixed a bug which lead to erratic programs in some cases. - You can now manually skip to the next pass before the whole file has been searched. This saves time but reduces efficiency. New in version 1.02: Fixed a bug which caused repeated patterns occuring at the very end of the file to eat up some of the gain. Copyright: ---------- (c) Copyright 1994, 1998 by Klaus Peichl. COMPACT may be freely used and distributed. Author: Klaus Peichl Oestliche Ringstrasse 7 85113 Boehmfeld Germany electronic mail: kspeichl@cip.e-technik.uni-erlangen.de peichl@usa.net WWW: http://cip2.e-technik.uni-erlangen.de:8080/hyplan/kspeichl/vip.htm