From gamma!ulysses!andante!princeton!njin!rutgers!iuvax!bsu-cs!ibmbin Wed Dec 31 19:00:00 1969 Relay-Version: version B 2.10.1 6/24/83; site lcuxa.UUCP Path: gamma!ulysses!andante!princeton!njin!rutgers!iuvax!bsu-cs!ibmbin From: spcecdt@ucscb.UCSC.EDU (John DuBois) Newsgroups: comp.binaries.ibm.pc Subject: "compress" for MS-DOS, executable Message-ID: <4288@bsu-cs.UUCP> Date: Wed, 12-Oct-88 08:07:59 EDT Article-I.D.: bsu-cs.4288 Posted: Wed Oct 12 08:07:59 1988 Date-Received: Sender: ibmbin@bsu-cs.UUCP Followup-To: comp.binaries.ibm.pc.d Lines: 411 Approved: dhesi@bsu-cs.UUCP Summary: compexe.arc, "compress" for MS-DOS, executable This is the source and executable versions of "compress", modified to compile with Turbo C. The version I got was modified to compile with MSC; I've changed some stuff so that it will compile under Turbo C and I fixed some problems that with the DOS version. It is useful in transfering files with Unix systems, since text files are often compressed by about 50%, thus halving transmission time. Also, it is a nice compression utility for single files since you don't have to do an archive listing to see what is in the file. Unlike archiving utilities it automatically removes the (un)compressed version when you compress/uncompress. Finally, if the program is named zcat.exe it will behave the same way "compress" does on Unix systems when invoked under that name; this can be very useful. Unfortunately piping stuff into "compress" on DOS does not seem to work well, and you can't pipe into "uncompress" because DOS is braindead about piping binary files; it stops writing to the temporary file when it encounters ^Z. I could only get it to compile in the small model (12-bit version) under Turbo C. This means that it can only uncompress files that were compressed using 12 bit codes, so if a file is to be compressed on some other system and uncompressed on DOS it should be compressed with the -b12 flag. The 12 bit version has the advantage that it will work with much less free memory and is faster, though the compression is not quite as good. Remember to use the -i (image) flag when compressing and uncompressing binary files under DOS. If anyone fixes the piping-to-compress problem or gets a >12bit version to compile, please let me know. John DuBois spcecdt@ucscb.ucsc.edu ...!ucbvax!ucscc!ucscb!spcecdt ----------------------------------------------------------------------- ADDITIONAL NOTES 1. Mr. DuBois is correct that a >12 bit version will not compile under TurboC 1.5. The reason is that the program exceeds the compiler's limitation on global variables. MSC 4.0/5, on the other hand, can handle it. Therefore, the program was re-ported back to MSC compatibility. The 12 bit version will still compile under TurboC. 2. The program has been modified to substitute a '-a' flag for the '-i' flag that Mr. DuBois used, with the difference that by default LF to CR/LF conversions are DISABLED. (Thus, the -a flag is identical to the -a flag used in the various ZMODEM programs.) The reason is that once a file that must be unchanged (e.g., executable file, archive, etc.) is compressed with the conversions enabled, it may be impossible to recreate the original. It seemed desirable to make this possibility one that must be selected consciously. 3. The compiled full version (compact model) is a 468K file. This is wasteful, and should be run through exepack. The savings is very substantial: the exepacked compress.exe is only 27K! Since TurboC does not include a utility comparable to exepack, this is another reason for compiling under MSC. bellcore!lcuxa!mike2