W R A P T O R V 3 Program and Text by Bill Lucier Fixes by Doreen Horne [FENDER'S PREMUMBLE:] Thanks to Doreen Horne of Queensland Australia the bugs and inadequacies of V1 and V2 have been taken care of and now we have V3, which should be used from now on. However, since V3 uses a different suffix, [.wr3] rather than [.wra], keep a copy of V1 or V2 on hand in case you find some [.wra] files you want to unWRAP. The following text by programmer Bill Lucier explains all about WRAPTOR V3. It has many uses but here on LOADSTAR we mainly use it for packing Geos USR files. Because these files are often large and can't be copied or loaded except within the Geos environment, they've caused headaches for us and our readers. Jeff and I love WRAPTOR V3 and we hope you find it as useful as we do. Here's Bill... WRAPTOR is a program I wrote to help backup ALL of my files -- without having to convert any GEOS files into CBM files first. Converting a 1581 disk full of GEOS files into normal Commodore DOS files and then compressing them with Lharc took quite a while. When you think about it, you have to (yet again) convert those files from CBM to GEOS once you unarchive the files. Not with WRAPTOR V3. WRAPTOR V3 does it all in one step and unwraps the files to any CBM/CMD drive type. One thing that WRAPTOR V3 will not do is compress RELative files. WRAPTOR V3 will average about 40 - 50 percent compression. This varies with the type of file being compressed; text files will compress 50-60 percent, while program files will only compress by 10 - 40 percent. GEOS files (most of which are already compressed) vary as well, but that will be discussed in greater detail in the GEOS section. Efficient compression means fewer disks are needed to do backups and less time is spent compressing files, so your 64 can be used for more pleasant tasks. WRAPTOR V3 also includes a DOS manager to simplify reading, scratching and renaming files. Unless you have a strong desire to type, the WRAPTOR DOS commands will save you a great deal of grief. [USING WRAPTOR V3] [````````````````] WRAPTOR V3 is 100% machine language but it loads and runs just like a BASIC program. Memory use is intensive so it would be best that no other task is loaded into memory at the same time. WRAPTOR V3 is totally menu driven for ease of use. There are three information areas on the screen. The middle left of the screen holds the directory menu area, where you will select files for archiving. The second area is the error message and user input area. This is located at the bottom of the screen. Input of file names and DOS commands will take place in this area. To the right is the menu, which will show about 5 active keys: I - Toggles Input drive O - Toggles Output drive D - Goes to the DOS menu A - Goes to the Archive menu Q - Quits to BASIC First Press I and O to set the desired input and output (source and destination) drives. If you have to move to a certain partition, you can press D and send a DOS command to do so. WRAPTOR V3 always informs you which drive will receive the command, and allows you to change the drive number for the command. [PRINTING FILES] [``````````````] Note that if you're routing files to the printer by selecting an output device of 4, be careful to output only text files. Program files will print as garbage. Program LISTings require the LIST command since BASIC programs aren't stored in memory as true text. If you will be outputting FGM files that were printed to disk or other graphic files, set your interface to transparent since the secondary address of WRAPTOR V3 defaults to 7 when printing. [YOU SHOULDN'T TRY TO OUTPUT TO] [THE PRINTER WHILE CREATING AN] [ARCHIVE] unless you want to analyze a hex dump. You will print garbage! Choose 4 as a destination only when you are decompressing WRAPTOR V3 files. Once the source and destination are set, you can begin archiving. Press A to go to the archive menu. You will see the following menu: C - Create archive E - Extract archive L - List archive F - Fast mode on Q - Previous menu Choosing C will give you a list of [all] the files on the input drive so that you can choose the files you want wrapped. Choosing E brings up a menu of any WRAPTOR V3 files found on the input drive. These are any files that end with ".wr3". You can then choose the files from which you want to extract. This will restore the archived files to your output drive. Choosing L brings up a menu of any WRAPTOR V3 files found on the input drive. You can then choose the files from which you want to LIST. [JEFF'S NOTE:] LIST is a misnomer here. A true list would be much faster. This "list" also tests the integrity of your archive by actually decompressing the file, but stopping short of actually outputting the file, similar to the ARC/V (verify) command from ARC 250. [THE FILE REQUESTOR] [``````````````````] The directory window is located in the middle left of the screen, just beneath the word, DIRECTORY. File names from the input device will be displayed in this window. To scan through the filenames, use CRSR up/down, HOME to go to the top of the list and RETURN to leave the directory window. To mark/unmark a file, press M. Once all desired files have been chosen press RETURN. Note that if you exit the directory window by pressing STOP no action will be taken on any of the files chosen. [USING WRAPTOR'S DOS MENU] [````````````````````````] WRAPTOR V3's DOS menu allows batch operations for renaming, scratching and reading files. Choose the active drive by pressing D. When the correct drive is showing, press RETURN. The directory will be read in and it will be shown in the directory window. As with all directory choices, mark (or unmark it) a file for usage by pressing M. When renaming, the old file name will appear in the input area so that if only slight changes are required, the entire name will not have to be retyped. When scratching, WRAPTOR V3 will always prompt to ensure that a file should be deleted. There is no way to bypass this as it is very easy to scratch more files than intended. Reading a file allows you to read only as much of a file as you want to. A screen full of text is shown at a time, after each screen you will be prompted to quit, continue or move on to the next file. QUIT will stop reading files altogether even if there were more files to be read. CONTINUE will display another screen of text from the same file. You can also enter DOS commands manually. This allows for commands up to a length of 35 characters and it will only display the contents of the error channel if the command caused an error. [CREATING ARCHIVES] [`````````````````] To create an archive, insert a disk containing the files to be compressed into a drive. If you only have one disk drive there should be enough free space to hold an archive file. First you will need to change the input drive so that WRAPTOR V3 will read in the directory of the disk that has the files you wish to compress. Then press C to create an archive. It is important to note that while WRAPTOR V3 will compress locked files they will no longer be locked once they are decompressed. Mark all files that you wish to compress by pressing M when the cursor is on the appropriate file. When all files have been marked press RETURN. WRAPTOR V3 will then prompt you for the name of the output file, up to 12 characters. The file suffix, [.wr3] will be added to the file name. You do not have to enter the [.wr3] as WRAPTOR V3 will do this for you. As the files are being compressed the bottom of the screen will show the name of the file being compressed, as well as how many bytes have been read in from the input file, as well as how many have been written to the output file. In many cases, files that have been previously compressed by milder means such as RLE and tokenization can be compressed even further by WRAPTOR V3. When files have already been compressed about as well as they can ever be compressed, they will likely grow if you try to compress them again. As long as most of your files are compressed normally, it won't hurt your archive if one or two out of the WRAPped files are a few hundred or a few thousand bytes larger than the originals. Again, files that are likely to become larger would be .GIFs, demos and files that have been previously compressed by another archiver of WRAPTOR's caliber, such as ARC or CS-DOS. [EXTRACTING ARCHIVES] [```````````````````] As with the creation of archives, WRAPTOR V3 will read in the directory, but only files with [.wr3] suffixes will be shown. Choosing files to work with is the same as with the other menus. The menu will be replaced by a full screen display to allow for more information. UnWRAPping can be manual or automatic. You are prompted at each file: Unwrap/Skip/All/Quit (U/S/A/Q) If you want to unWRAP (extract) the current file, press U. If you want to skip to the next file, press S. Don't, however, expect the unWRAPping to be faster if you skip files. Because of the way WRAPTOR V3 works, it will still seem to be unWRAPping the skipped files, but it won't create a disk file. Skipping is not a way to save time; it's only a way to keep from saving a file you don't want to create. [JEFF'S NOTE:] I added the "All" feature. If you hate being prompted at each file like me, press A and all files will be extracted in succession without user prompt. Holding down any key or CONTROL key will take you out of the "All" mode. Of course you can get back into that mode by pressing A again when prompted. Q will quit the extraction process altogether. If a file was not extracted properly, ERR is printed in red under the CRC column. The CRC is the Cyclic Redundancy Checksum, a way of telling if the file extracted was the same as the one that was compressed. Other information available is the filename, the size of the compressed file and the size of the file after compression. Note that if there is an error, the file will still remain on disk. Geos files, however will not be converted to true Geos files (recognizable by Geos) if there was an error. This format is not compatible with the format used in the convert program written by William Coleman. [LIST ARCHIVES] [`````````````] The purpose of this menu choice is to allow you to ensure that the archive just created is error-free. The archiver still has to decompress the file to find the end of it but it does not save the results to disk. [WRAPTOR V3'S FAST MODE] [``````````````````````] When fast mode is used, the VIC chip is disengaged, and the CPU will process data about 7% faster. On the 128, the CPU is put into 2MHZ. The fast mode is only used while doing compression. Disk usage during decompression is very frequent and little would be gained by having a fast mode. SuperCPU, Turbomaster and FLASH 8 users may not need the fast mode. [COMPRESSING GEOS FILES] [``````````````````````] Compressing Geos files with WRAPTOR V3 can bring about varying amounts of compression. The sequential Geos files (most normal GEOS program files) tend to compress at about the same rate as normal CBM files. Geos VLIR files tend to compress fairly well. In order for Geos to access large amounts of data quickly, Berkeley used VLIR files. This is a method of dividing up data in a manner that allows for the access of different pieces of data. The cost of this method is that it can quickly take up large amounts of disk space. Geos files take longer to compress and decompress due to the amount of disk access, but it is still much faster than converting and then compressing. Geos files must be written to disk twice, once to get the actual data on disk and then again to find the start place of each VLIR file and to create a VLIR table. WRAPTOR V3 can compress/decompress to 1541/71/81/rd/rl/hd but note that it will not work with 1581 subpartitions. [LIMITATIONS OF WRAPTOR V3] [`````````````````````````] WRAPTOR V3 will not work with RELative files at all. This is due to the fact that they are rarely used. The boot files for Gateway cannot be compressed and decompressed properly. The CBM directory thinks of those files as normal PRG files, but they are really VLIR files in disguise. Due to limited memory, only about 150 filenames can be held in memory at once. This is not a problem for those who just use 1541/1571, but unfortunately those with 81/fd/rd/rl/hd will have to make several archives with as many files as possible in each archive. [NOTE:] Doreen Horne, while working on V3, found that you should have as many blocks free on a disk as there are files to WRAP/unWRAP. See the article "WRAPTOR V3 Saga" on this disk for details. It is important to understand that WRAPTOR V3 is a file archiver, not a disk archiver. Some protected programs contain extra data on the disk that is not in a file. In such a case it may be best to use a disk archiver, such as ZIP CODE, and then compress the zipped files. [FENDER'S POSTMUMBLE:] Although WRAPTOR V3 is a copyrighted program, we want all LOADSTAR subscribers and the people they correspond with to be able to use it. We have no problems with a subscriber sending a copy to a friend. Just tell 'em that LOADSTAR is full of good programs like WRAPTOR V3.