COMT is Copyright 1991, 1992 Alexander Pruss. Some rights reserved. All use is permitted limited only by the law of the land and natural law. I hereby specify that only the exact version I produced belongs to me. Any modification, however trivial, renders my rights to this null and void. Thus, if you change this copyright message this program shall no longer belong to me. I permit any such modification, and I permit any removal of credit to myself for this programme. NO WARRANTY OF ANY KIND IS GIVEN. Interpretation of natural law is left to the user's conscience. OFFICIAL PUBLIC RELEASE OF COMT version 0.10d This program is used for turning an .COM format executable into a text file suitable for trasmission over text-only networks such as BITNET or UseNet. Unlike other such programs like UUENCODE, it is totally bootstrapped and does not require any decoder. The executables processed with COMT if originally in .COM format will still be executable, even after they are turned into a text file. Of course the output will be longer than the input, by about 35% for large files, more for smaller. This means that after they are sent, possibly embedded in a message, they can be simply extracted with a text editor and run as-is with no decoding needed. The only thing to be remembered is that by the time the file ends up again on a PC, it must be a PC-text file, which generally means it has to be transferred always in text mode. It is easy to find out whether a file is a PC-text file by just putting TYPE filename and seeing if the lines are neatly aligned at the left hand margin. Here is a sample COMT output file: --OUTPUT BEGINS NEXT LINE-- ENC.COM.BCF= %00%@@PZ-rm-rm-]#P_R^N15,)P_R^!5RX,p4{P^15RX-qn-qnP-Q!PY-!p-!`-!0P]= X-s!P_WR^!5GG!5GG!5GG!5GG!5_RX-`K5pPP^15GG15GG15GG15GG-~!5Z#P^15Q_ RX3FcEE2 method is chosen where each byte is encoded as two bytes, and the bulk of the output consists of uppercase letters. For larger files a 3->4 method is used where three bytes are encoded as four. I can see no reason for overriding the choice, unless you want the output to be larger than usual (but see BUGS section for mention of marginal cases.) The 3->4 method is obviously more efficient for larger files, but it suffers from a longer decoder at the beginning, for smaller files. To specify 1->2 encoding throw in a -1 flag, and for 3->4 encoding a -3 flag as in: comt -1 inname You can extract a COMT-processed file into the original. This may be useful if you want to save disc space or the miniscule time needed to decode the executable. Of course, the COMT-processed executable can be run just as well as the original, if you wish. If the file filename contains the COMT-processed file, put comt -x filename [outname] to extract it into the original. By default the extension of filename is .COM and outname is filename.COM. Remember, to do this you need not take the file out of any message wherein it might be sitting. If more than one COMT-processed file is in filename, the first will be extracted. Note in particular that if you use comt -w to create filename.ASC, then comt -x filename will recreate filename.COM. Further, running comt -x comt.doc hello on this documentation file, will create hello.com, as given in the example above, and this hello.com will be decoded into its pre-COMT format. SELF EXTRACTING ARCHIVES If you have several files you want to bundle into a self-extracting COMT-style plain-text archive, you have to glue them together first into a self-extracting .COM file. This can be done at present with only one archiving utility, LHARC. (All others I know create .EXE files; LHARC creates .COM files if the output is under 64kB.) DO NOT USE LHA, AS IT DOES NOT PRODUCE .COM FILES. Mr. Robert Jung informs me that in the future his ARJ archiver may produce .COM self-extracts, but do not hold your breath. Here is some info on the LHARC I use: LHarc version 1.13 (Test version) Copyright (c) Haruyasu Yoshizaki, 1988-89. ================================================================ 05/04/89 === <<< High-performance file-compression program >>> You can simplify the process by using the COMTARC.COM or COMTARC.BAT program. If you have LHARC 1.xx on the path, type: COMTARC [-w] outname file1 [file2 ...] to create a COMT-file (i.e text-readable) outname.COM (wrapped as outname.ASC if -w is given) containing file1 [file2 ...] (wildcards ARE permitted) and self-extracting them upon execution. No extension on outname may be given. COMTARC.COM is simply created from COMTARC.BAT by the PC-Magazine BAT2EXEC utility, and is slightly faster. SUMMARY OF OPTIONS comt [-1 -3 -w -nname|-x|-h] name[.COM] [outputname] Options: -x Extract from file -1 Use 1->2 encoding -3 Use 3->4 encoding -w Wrap in a text wrapper -nname Set name to wrap as -h This help information By default the input file is overwritten. If -w is specified, the output file name.ASC is by default created, unless the outputname is specified. Default extension on outputname is .COM except in -w mode where .ASC is used. USEFUL SUGGESTION Run PKware's PKLITE on .COM files before running COMT to save space (and allow you to COMT larger files.) COMT appears to be fully compatible with PKLITE. I have no connection with PKWARE, and PKLITE is the only one of their product which I specifically recommend. BUGS AND LIMITATIONS For some marginal files an error in choice of 1-2 or 3-4 encoding may result in files about 40 bytes longer than otherwise. Executables larger than about 45Kb encode to more than 63Kb and so cannot be run in the encoded format, though COMT -x can be used to decrypt them. The -x extract option will fail if the file it is extracting from contains the magic symbols S&$ig(Ap at the beginning of a line before the COMT-processed data. This should cause no one problems. There may be more bugs. No virus checking software looks under the COMT encoding. As a plus, you can look at COMT-processed executable and if it is plain text (no funny control/extended/foreign characters) then it is a very good bet that no virus hooked to it AFTER the original COMT-processing (since the virus would be very unlikely to be plain-ASCII readable.) The author absolves himself of all responsibility. He can be reached at pruss@math.ubc.ca (internet).