An Introduction To Using ARC and LHarc

Being a committee member of ACE NSW means that I get to help other members with problems. One of the most common problems is trying to extract files from ARC files downloaded from the ACE BBS or even from some magazine disks.

In this informal tutorial, I hope to explain how to ARC and unARC files using ARC v6.02, LHarc and ARCshell v2.1 as supplied on the ACE NSW starter disk. Power users should refer (and I hope understand) the expansive docos of each of these utilities.

Please note that I use the word ARC pretty loosely in the article. When I write "ARC" is stands for ARChive (the compression process) and "extract" means unARChive (the uncompression/extraction process). When I refer to the utility ARC v6.02 I mean the program ARC.TTP (v6.02). The same applies to LHarc v1.02 and LHarc v0.60

What is ARC?

ARC stands for ARChive and is a means of "storing" file(s) in a file that is smaller in size than its contents. It does this by a compression method, and because of its smaller size, is of great advantage to BBS's (where you download a smaller file and hence save time and money) or where space is tight, as on a magazine disk.

Now this sounds wierd right? How can a file store files and still be smaller than the sum of the originals. Well the best way to explain this is to relate it to something else. Image a piece of paper that has writing on it. This is the file, two pieces of paper - two files - etc etc. Stack the paper and fold it in neat halves. Each sucessive fold makes the paper smaller yet it contents (the writing on the paper) is unchanged except in apparent size. This folded state is a ARC file and the folding process is related to the ARCing process.

Unfold this folded paper and you get the original pieces of paper back to their original size, the extraction process.

In its folded/ARC, state the file is not like the originals, and hence cannot be run from the desktop. The only way to get the original files is to unfold it in the reverse way you folded it. - Understand?

Ofcource there are different ways of folding paper, and this relates to the different ARChive formats. There is ZIP, ZOO, LHarc, ARC and many others, but the two most common and versatile are ARC and LHarc and this article deals only in these two formats.

The ARC Format.

The ARC format was the one of the first ARChive format invented and hence the most common. PC's have the ARC format and the ARC format used on the ST is a direct port. The utility that does all the work is called ARC.TTP and is now up to version 6.02. Here are its features:-

    * Fast 
    * Able to include whole directories (v6.02 only) 
    * Only one standard across all machines 
    * compress to around 50% 
    * It creates files of the type *.ARC

As you can see its a TTP file, which means that as it runs, commands are passed to it and ARC.TTP carries them out. There are lots of commands and so to simplify its use ARCshell is used as a front end and passes your instructions to ARC.TTP in a format it understands and does what its told.

The LHarc Format

LHarc is the second most common format and is completely different to ARC. Its features are:-

    * Slower than ARC.TTP
    * Compresses better than ARC especailly text (~60-90%)
    * Creates files of the type *.LZH

There are two rival utilities, each do the same job, but is some respects are different. Files are not allows easy to ARC in one and extract in the other. The two are:-

        - LHarc v1.02
            * Less friendly than the other 
            * Swavek uses this, so most files on the ACE BBS are in this 

format. * Not able to extract files if previous files are corrupt. ie if one file is corrupt (a CRC error) then all files in the ARChive are lost.
* Not able to write comments.

        - LHarc v0.60
            * Friendly
            * Able to extract files even if some files are corrupt
            * Able to include comments that are displayed by the List 

command. * Used in Europe * I use it!

The general rule is use LHarc to ARChive file(s) and only use ARC v6.02 to ARChive folders and file(s). This is because LHarc almost always compresses better than ARC.TTP

System SetUp

Ideally you want to run ARC/extract at top speed and this is done by either using a hard drive or a RAM disk. Most users have 520/1040 ST/STE's and so really don't have all that much memory to spare... Those with 1040 and higher (ie 1Meg and up) can afford to setup a RAM disk the size is dependent on your machine and free RAM, try to have 500K free - so a 500K Ram disk for 1Meg machines, 1500K for 2Meg machines etc etc. If you have a hard drive then jump to "ARChive Disk Setup" you lucky people!

I advise that you make a separate "ARChive Disk" that you boot and run the ARC/extract programs from... This should be a bare bones setup with just a ramdisk program (if you have the memory) and the programs. If you have the Universal Item Selector III or Little Green Selector, put this on the disk too. * The latest version of the Little Green Selector is in the PROGRAMS folder on InfoDisk - Ed.

As mentioned before, there are two LHarc programs, have both on the disk, so that if one fails the other may succeed.

ARChive Disk Setup

Setting Up ARCShell v2.1b

The ARChive utilities themselves are quite difficult to use, and so to simplify their use, ARCShell was created. ARCShell as the name implies is a "shell" program - it sits infront of the ARChive utilities themselves and pass your instructions to them in their "language". Once the utility has finished the task the computer returns to ARCShell.

Because ARCShell works so closely with the utilities themselves, ARCShell has to be configured so it knows where certain files are. When ARCShell doesn't know where a file is, it will ask for it. The best thing to do is place the utilities etc as show above and then run ARCShell, configure it and save the setup for future use.

If you have the ACE (NSW) starter disks, then you have ARCShell, ARC v6.02 and LHarc v0.60 already setup. Take those files and setup them as you like (or as in this article).

ARCShell itself is very clever. It will access two utilities of both ARC and LHarc giving you four programs under ARCShell's control. ARCShell handles these by setting one as a "Default" and the other an "Alternate" utlility and has this for both ARC and LHarc. Normally any instruction issued will be handled by the Default utility, switchs are provided to access the Alternate utility though.

Okay, enough theory, lets do something!

Run ARCShell (medium or high resolution only!) after placing files and folders as above. If ARCshell was configured to a previous setup it will NOT tell you that things have changed until you use them, then it will say it cannot find the utility and will ask you to check the configuration. Lets configure it then!

You will be presented with a screen full of buttons, as Arthur Dent was told on numerous occassions, Don't Panic! Here is what you will see (well roughly anyway...) :-

    Add         eXtract             Hold Screen
    Move        Run                 Keep Backup
    Update      Copy to StdOut      Suppress Compression
    Freshen     List                Suppress Messages
    Delete      Verbose List        Suppress Notes
    Test        Convert             Include Subdirectores
    ^^^^^^^^^^^^^^^^^^^^^^^         Over Existing Files
      These do tasks                Encryt | Code:
                                    LZH Comments
                                    ^^^^^^^^^^^^^^^^^^^
                                    These are switchs

Below these you'll see...

    DEF:        ALT: < Flip between Default and Alternate utilities

    ARC | LZH        SCR|PRT|DSK    ARC Drive   < Default drives that
    ^^^^^^^^        ^^^^^^^^^^^^^   Data Drive  < hold ARC/LZH files &

Flip between ARC & LHarc Choose output destination files

            Default
            Alternate        INFO|DISK|CONFIG|EXIT
            ^^^^^^^^^        ^^^^^^^^^^^^^^^^^^^^^
    Switch between Default   Information, Disk operations, Configuration,
    & Alternate utilities           Exit ARCShell

Most of these buttons you won't need unless you want to do bizarre things like freshen files inside ARChives, run a file inside a ARChive without keeping a copy of the extracted file etc etc. I won't go into this as this article is intended to introduce new users to ARC, if you want to use these functions then read the manuals of ARC v6.02, LHarc and ARCshell.

The Buttons are switched on with a left click (and go black). The Task Buttons can be activated by double left clicking or a single right click. A single left click "primes" that task and if RETURN is pressed, then the blackened Task is carried out.

With the mouse, first click on "ARC" from the "ARC|LZH" in the middle left and then click on "CONFIG" in the lower right corner, you'll see:-

                 Default Archive Utility

             Locate Default Archive Utility

                 Alternate Archive Utility

            Locate Alternate Archive Utility

   Directory for Temporary Files (valid only with ARC 5.21)

        Use Arc's | Use Data Directory | Set Directory

Printer Name PRT:PRN | Buffer Screen | Prompt for Delete | Save Config | Exit |

This screen gives ARCshell the location of the ARChive utility. We have set ARCshell to ARC (from the ARC|LZH toggle) and now click on "Locate Default Archive Utility", a file selector will pop open, now open the folder(S) to get to ARC.TTP and double click on ARC.TTP. If you have the above mentioned setup then the blank line will look something like:

Because we have no alternate ARC utility, leave the Alternate section blank.

Because we are not using ARC v5.21 you can ignore the Temporary file section. But to be safe, I set it to "Use ARC's Directory".

You only need to set the printer name if you are going to redirect output to the printer through the "SCR|PRT|DSK" switch on the main screen. I leave the output to the screen, SCR, and so don't need this setting. Refer to the ARCshell manual for further details.

Set the Screen Buffer ON and set the Delete Prompt ON as well. To save the configuration press "Save Config", do this at any stage, or wait until the end.

Click on "Exit" and you are back on the main screen. In the DEF: ALT: section you should see (if the previous task was done correctly) :-

            DEF: ARC.TTP  ALT:

If all is well then click on LZH in the "ARC|LZH" toggle. Again you will see a screen like descibed and this time locate the LHarc utilities. Out of personal preference I set LHarc v0.60 as my default and LHarc v1.02 as my alternate (Swavek may prefer the other way). If you have both LHarc utilities then first click on "Locate Default...." find LHarc v0.60 (LHARC.TTP) as done when finding ARC v6.02, then click on "Locate Alternate" and find LHarc v1.02 so that the blanks lines look (assuming you renamed them and have both versions)

For Floppies Default: A:\LHARC060\LHARC060.TTP

    Alternate:  A:\LHAR102\LHARC102.TTP

and Hard Drives Default: C:\ARCHIVE\LHARC060\LHARC060.TTP

    Alternate:  C:\ARCHIVE\LHARC102\LHARC102.TTP

Again set Screen Buffer and Delete Promp ON. When you exit and return to the main screen you should see:-

        DEF: LHAR060.TTP  ALT: LHAR102.TTP

If all is well lets continue, if not repeat the operation....

ARCshell expects two other paths, the one that contains ARChive files (*.ARC and *.LZH) and the path to the files to make ARCs/destinations or extractions. These are called the "ARC drive" and "DATA drive" respectively,
both ARC v6.02 and LHarc use the same ARC/DATA paths. These are not set from the main screen, but the _drive_ on which they are to be found is set, and is important. Hard Drive users have no worries, but for 520 and Ram Disk users one has to consider their setup. ARCing is a slow process, but even worse are the potentially large files being handled and the lack of room. An innocent 50K LZH file can extract to 200K of files and worse!

520ST/STE owners with 1/2 Meg of memory will be forced to use floppies for the whole process. Unless you have a second floppy (Drive B:) then the ARC/extraction must take place on the ARChive Disk (Drive A:). If you have a B: drive then set both ARC and DATA drives to B:. In each case, create \ARCS\ and \DATA\ folders on these disks.

Machines with 1Meg and more (1040ST/STE & Mega's), if equipped with two floppy drives can do the same, but if you set a RAM disk (eg Drive D:) then the speed of operation is increased dramatically. With ram disks, you can create the folders \ARCS\ and \DATA\ if you like, but remember either way, the files created (be it *.ARC, *.LZH or extracted files) MUST be copied to a floppy BEFORE you turn off your computer!

Hard Drive users can use flopppies, but maximum speed is attained by using the hard drive or, if memory permits a ram disk. When using hard drives, set the ARC and DATA drives to the partition that contains the \ARCS\ and \DATA\ folders.

Once you've decided, click on "ARC drive", a 4 by 4 grid displaying the 16 drives is shown. The unavailable drives are greyed out. Pick the drive where the ARChive files (*.ARC & *.LZH) are kept (the \ARCS\ folder). Do the same with "DATA drive", choosing the drive that holds the files that are to be compressed, and files that are extracted (the \DATA\ folder).

As I said, consider your setup. I personally have a 1040STE with 2.5Meg and
no extra floppies or hard drives, so I use a ARChive boot disk that sets a 2Meg RAM drive D: where all ARC operations are carried out.

On the main screen, ensure the "Hold Screen" and "SCR" buttons are active. Once set, go back to CONFIG and save the configuration. Saving the configuration saves all paths, active buttons (eg ARC or LZH, eXtract if primed) and also saves the path to your \ARCS\ and \DATA\ folders. To save these paths, a real operation has to be done and then the configuration saved again.

Using ARCshell

On this Inside Info disk I've included an ARChive of this text file, called ARC_TUT.LZH. We'll practise on this file after everything mentioned above has been carried out. * You will find ARC_TUT.LZH in the root directory of Inside Info on quitting InfoDisk - Ed.

1) Copy ARC_TUT.LZH into your \ARCS\ folder (or RAM disk).

2) Run ARCSHL21.PRG and make sure the configuration is as you saved it.

3) Ensure the LZH of the ARC|LZH toggle is black (so you use LHarc) and notice that the DEF: LHARC060.TTP is black. Also notice that clicking on the ARC side of the toggle brings a DEF: ARC.TTP. Anyway set it to LZH.

When ever you activate a task, ARCshell will ask what files are to be used, this is done through file selectors, and if you use the Universal Item Selector III, Little Green Selector or TOS 1.4/1.6 then meaningful questions like "Choose an LZH file" will be displayed. At any stage the operation can be aborted by pressing "Cancel" button on the file selector. Once selected, ARCshell then loads in the archive utility and passes the instructions. Once finished, ARCshell regains control.

You can filp between the default and alternate utilities by clicking on DEF: LHARC060.TTP or ALT: LHARC102.TTP. This will use that utility for the next task and then pops back to the default utility. One can set all tasks to always use one or the other by clicking on the little "DEFAULT|ALTERNATE" switch buttons.

Lets get a VERBOSE LIST of the contents of ARC_TUT.LZH...

4) Right click on "Verbose List", a file selector will pop open, if UIS/LGS/TOS 1.4/1.6 is used then there will also be "Choose an LZH file". Find ARC_TUT.LZH in the \ARCS\ folder and select it by either pressing OK or double clicking (LGS users can simply right click).

5) Buzz Buzz things happen, and soon you see a list of the contents of ARC_TUT.LZH. This verbose list gives date, checksums and other details. Notice the original size of ARC_TUT.TXT compared with the actual size of ARC_TUT.LZH. When ready press a key or mouse button to return to the main screen.

The "LIST" command is similar to the "Verbose List" command but displays less information. The "List" command will display the comments contained in the LZH file if the comment ability of LHarc v0.60 is activated by the "LZH Comments" button on the right side of the main screen (more on this later). The Verbose List and List commands are similar across both LHarc's and ARC v6.02. Another common command is "TEST", repeat steps 4 & 5 but on TEST and see the result. TEST virtually extracts the files in memory to check their integrity.

Lets now extract the file(s) from ARC_TUT.LZH...

1) Activate "eXtract" from the main screen. The file selector appears asking "Choose an LZH file". The path of your \ARCS\ folder is know to ARCshell from the previous operation and now just select ARC_TUT.LZH.

2) The file selector reappears asking "Choose the data file(s)" (remember only UIS III/LGS/TOS 1.4/1.6 users see these questions). Open the \DATA\ folder. If you now enter "." then ARCshell will instruct LHarc to extract the contents of ARC_TUT.LZH into \DATA. If however if leave the selection line blank, and press return or click OK the a box like below appears:-

                    ALL         w/Query
                    To Folder   Cancel

                      Change Default

Left clicking on one the above will:-

"ALL" means that the contents will be extracted to the folder selected in the Data File(s).

"To Folder" means that a folder INSIDE the selected folder will be created and the contents extracted into it. The name of the folder created is the name of the file, in this case the folder \ARC_TUT\ would be created inside \DATA\ and the contents of ARC_TUT.LZH extracted into \DATA\ARC_TUT\

"w/Query" this displays a list of the contents of ARC_TUT.LZH and gives you the choice of what file(s) to extract from ARC_TUT.LZH

"Change Default" Notice the border around "ALL"? This is the Defaul action, pressing Return or Enter will activate this action. By selecting the "Change Default" before you select one of the other actions will set that as the Default. Save the configuration in CONFIG to keep your new default.

Once a button is selected, buzz buzz, things happen and the contents are extracted.

After this you are given the choice whether you want the original LZH file deleted. Choose...! Press a key to return to the main screen (this is the "hold screen" button).

Now reSAVE the configuration and the paths to \ARCS\ and \DATA\ will never have to be set again.

Exit the program and prove to yourself that the files inside ARC_TUT.LZH are in the destination folder.

This extraction process is exactly the same for ARC v6.02, the paths to \ARCS\ and \DATA\ are the same etc. The default from All/To Folder etc is kept too. The only thing different is that the file selector asks "Choose an ARC file"

Now to do some ARChiving! We shall create a ARC file containing ARC_TUT.LZH.

1) Run ARCshell again (thats if you left it!)

2) Switch to "ARC" in the "ARC|LZH" toggle. Notice "DEF: ARC.TTP"

3) Activate "Add". At the "Choose an ARC file" file selector (it should already be in \ARCS), type in a name with the extender ARC, anything, even ARC_TUT.ARC!

4) The file selector reappears inside \DATA\ asking "Choose the data file(s)". Here you select the files, one at a time, to be added into your ARC file. If a single file is selected, then ARC v6.02 does its thing (press a key) and asks again with the same file selector. This repeats itself, selecting, adding etc until you press Cancel on the file selector.

Another way is just type . or press Return with a blank line at the first "Choose the data file(s)" selector. If you have a directory(ies) INSIDE the directory of you DATA files, and had set the "Include Subdirectories" button ON then these subdirectories and their contents are included in the ARC file. Only ARC v6.02 has this ability.

Thats it, not too hard is it? Do a LIST or VERBOSE LIST of your newly created ARC file.

This ARChiving process is exactly the same for LHarc. When using LHarc v0.60, there is the ability to add comments to each file added. This feature is activated with the "LZH Comments" switch. When active, after you select the DATA file (as per step 4) a blank line of dark spaces appears. Type in a sentence and press return, this comment is added along with the selected file. Pressing Return at the blank line doesn't add a comment. LHarc v0.60 will ask for a comment to be entered for each selected file. These comments are viewed in LHarc v0.60 with the LIST button when the "LZH Comments" switch is on.

To Conclude

And so ends my rather long tutorial, I hope it helps. You may be interested in a program that simply extracts LZH files at faster speeds than LHarc v0.60 or v1.02. Its called "UNLZH v1.72" and is on the ACE BBS. I recommend it!

This tutorial was intended to be simple and bare bones and almost like Play School, introducing new users to ARCshell. There are many options I have not mentioned, nor have I mentioned how one can install ARCSHL21.PRG as an application. For these and many more features I leave it to you to read the text files that come with these programs.

Have Fun!
Gary Spiteri


Links

Copyright-Bestimmungen: siehe Über diese Seite
Classic Computer Magazines
[ Join Now | Ring Hub | Random | << Prev | Next >> ]