Archived Files
(Part 1).
If there's one type of data file that will send a new computer user scurrying for cover it's the archived variety. Why these files strike fear into even the bravest of souls is understandable. The key to fear is knowledge, certainly true in this case. Over the next few minutes we will discover that compressed files (more commonly known as archived files) can be a great ally in the AtariPhiles world.
What is compression ?
Compression is exactly what the name suggests. The compression
software takes a file and reduces it in size. This can be done in a
variety of ways. Some methods are more successful than others, some
are faster than others.
Let's take a very quick peak under the bonnet. Without getting too in depth there are mainly two types, lossy and lossless.
Lossy compression actually removes certain parts of the file it deems unnecessary. This sounds disastrous but rest assured, it's only used with files that will not be adversely affected. True colour graphics can be given the Lossy treatment. A little data missing here or there will not be noticeable to the viewer. A JPEG file is one compressed using the Lossy method.
Most data files such as those from word processors or spread sheet programs would certainly not benefit from this type of compression. These are compressed using the lossless method. As the name implies all data remains intact. Most compression routines used on the Atari are lossless.
How does compression software work. Well there are various algorithms the simplest of which is called run-length encoding. Take the text string "AAAAABBCCCDDDD". When this is run though a run-length encoder you end up with "5A2B3C4D". Clever but not very practical as we don't write in this manner. This method does give a grounding into how compression works however. It's very basically a case of looking for repeating patterns in a file, noting how many times they occur and replacing them with a code, which once completed results in a much smaller file. When the file is de-compressed these codes are read and translated back into the original file, warts an' all.
One paragraph is clearly not going to explain the ins and outs of compression in any great detail. Unless you actually plan on writing a compression program there is no need to know the full details. This part of computing is a little like driving a car. Learning how to use it rather than how it works is much more important.
One of the great advantages of compressed files is there ability to store many files in one compressed file. You could compress a whole directory if you wanted or even a whole disk. It's this function that has led to compressed files to being christened archived files. Where will I encounter archived files anyway?
The most likely place you'll find archived files are on the disks provided by PD libraries and computer magazines. The main advantage is the ability to squeeze much more on the disk than is normally possible. These are usually supplied in a self extracting format. Don't worry we'll come to this later.
The one area of computing where you can't avoid archives is in Comms. Ninety percent of all files downloaded from your local BBS, Cix or the Internet will be compressed. This offers two advantages, a smaller file to download and a lot less space consumed on your hosts hard drive. For those of you who have been steering clear of compressed files here's shock number one. You are probably already using them. Many graphics programs use compression when saving their files. Degas Elite, a very early Atari art package can save either *.PI? or *.PC? files. The later is a compressed version of the former. This you may have already been aware of so here's shock number two. Many of the programs you use are compressed. When you run them they unpack into memory. This proves two things. First use of compressed files is sometimes so easy it's invisible to the user, second it can work very quickly.
Shock number three, by the end of this article you'll wonder what all the fuss was about.
Compression file types.
All compressed files give away their origins in the file extender
unless they are self extracting. The most common types found today are
*.zip, *.lzh, *.zoo and *.arc. The later two aren't as popular as they
used to be. The reason is simple, the first two are superior in many
ways. They are also supplied with their own shells making their use
incredibly easy. Yes that's right the days of typing cryptic commands
onto a command line have almost gone. Archiving programs have caught
up with the graphic user interface at last.
The Command Shell.
The main part of all achieving software is a TOS program. TOS programs
do not use windows, menus or the mouse. This is a great advantage too
many computer users. Sysops like to use TOS programs as they can be
called by their BBS software and sent commands to carry out certain
tasks, compress files for instance. This is all carried out
automatically, and at a great speed, there is no need to display
dialogues of any kind. Software programmers can also call TOS programs
from their own creations. A good example is an install program. When
you buy new software it might come on one or more disks and is often
compressed. The install program will unpack these files using one of
the TOS programs already mentioned.
This approach, well being very advantageous too some is a big disadvantage to others. We normal computer users haven't got the time or inclination to learn the many commands required to use the many TOS programs available. Enter the command shell. A proper Gem program using all the features of Gem you expect. Just carry out the required function using the mouse and the shell translates these actions into commands the TOS program can understand.
Lharc shell.
Lharc Shell is designed to interact with the TOS program called
lharceng.ttp. When you run Lharc Shell a large dialogue opens split
into two small scrolling windows. The window on the right is very
similar to a file selector. It show the files sitting on the current
drive. The window on the left shows files contained in a *.lzh
archive. If the left hand window is empty the shell is waiting for you
to load in a *.lzh file or create a new one.
The best way to load in a file is to use the Install Application feature on your desktop. Highlight the Lzhshell.app program and go to Install Application. For file type enter LZH. Now if you wish to unpack a *.lzh file all you need do is open it and the shell program will run. This applies to all the shells we will be covering in this feature. If you wish to load a *.lzh through normal channels you can either use the shells File menu or click on the close box found on the left hand window. Both of these will open the file selector and allow you to pick the file required.
Once the file is loaded you will be able to see what it contains. Set the right hand window to the destination you wish the files to be unpacked. Highlight the files you wish to unpack from the archive by single clicking on them. All you need to do now is click on the Extract Files button. Lharc shell will then unpack the files for you.
To create an archive you just carry out the previous operation in reverse. When the file selector appears type in a name for your arced file, "myfirst.lzh" for example. All you need to do now is highlight the files in the right hand window and click on the Compress Files button. These files will then be packed into the *.lzh archive. The compression routine actually copies the files into the archive. The original files are quite safe, no harm will come to them. It's no different in fact to normal file copying, apart from the fact that the file is compressed before it reaches its destination.
As you can see from the main Lharc shell window there are a few other options too. Display will unpack a file in memory and show it to you one screen. Handy if you wish to view a readme file before you unpack the full archive.
You may also delete files from an archive, add new files and even create folders inside the archive.
St Zip.
St Zip, probably the most popular of all Atari archive formats uses a
shell similar to Lharc Shell. It has no menu and all work is carried
out in the main dialogue. Stzip communicates with the TOS program
zipjr.ttp. The main difference between Lharc Shell and Stzip appears
when you run the program. You are presented with the file selector
immediately. From here you either direct it to a *.zip file or type in
the name of a new *.zip file.
When the Stzip dialogue opens you will see that the left hand window has the file selected or created loaded and ready for action.
As in Lharc shell you simply select the files to be unpacked from the left window or select the files to be packed from the right window.
Why is Zip so much more popular than Lharc? There are two main reasons. First, the Zip format is very popular on the PC. You should be able to unpack files created with PKzip (the PC version) in STzip, though this is not always the case. Second the Lharc format went though a period of instability. Packing a file on one computer platform didn't mean you could transfer it to another. Lharc files are generally considered to be the faster of the two at packing and unpacking though. From a personnel point of view I've always found Lharc to be the most reliable when sending files via modem.
Two In One.
As can be seen from previous examples the dedicated shell programs
only communicates with one main TOS compression program. This means
running different shells for different archives. It would be much
easier to just use one shell and get it to communicate with all manner
of compression programs. This is where Two In One and Pacshell come
in. Pacshell takes a completely different approach to Lharc Shell and
Stzip. We'll come to this later, Two In One however is very similar
with one or two important exceptions.
It not only supports Lharc and Zip but also Zoo and Arc among others. The other supported formats are not important at this stage, especially as you'll rarely come across them on a standard Atari set-up.
As can be seen from the screen shot we have the now almost standard two windowed dialogue. The main difference here is the lack of a left/right divide. Normal files or archives can be loaded into either side and transferred in either direction.
When you first run Two In One it needs to be configured. This is probably the most difficult part about using the whole program. The unregistered version isn't supplied with the compression software. This will have to be sourced from the same place you obtained the program, usually a PD library or BBS. The advantages that come with this type of shell are obvious. Only one program to learn, let it worry about the TOS compression software you've installed.
Two In One comes with many other features. For basic archiving and unpacking it can't be beaten, unless of course you prefer Pacshell's methods.
Pacshell.
Pacshell will appeal to experts and beginners alike in the field of
archiving. It dumps the split dialogue method and goes back to the
very basics. The basics we all learnt in the first few days of using
the Atari. The theory is if you can use the desktop you can use
Pacshell.
Pacshell is an archiving desktop equipped with drive icons, windows and a menu bar. It is configured in a similar manner to Two In One on the principal of using one shell to deal with many archive formats. If you want to de-archive a file on your A drive open a window to it and double click on the file in question. Pacshell will open a window containing all the files in that archive, exactly the same as if you'd opened a folder. Copying files from this window to another will unpack them, you can't get much easier than this.
Creating new archives is just as easy. Go to the file menu, select New archive and Pacshell will open an empty window. Any file dragged to this window will be added to the archive. Strong rumours suggest that Pacshell will soon work seamlessly with Thing (The shareware replacement desktop). Instead of using it's own desktop Pacshell will use Thing's.
Compression within compression.
As has already been mentioned many graphics programs compress their
data files. What happens if you select one of these for archiving. For
that matter what happens if you select a *.lzh archived file and put
it in a *.zip archive ?
Nothing exceptional I'm afraid. Most compression programs will recognise that the file has already been compressed and simply include the file in the new archive. You may get a message saying "File already compressed, stored". One the odd occasion the archiving software will try and compress the file again, this may or may not be successful. It may even result in a larger file but rest assured no damage will occur.
Self extracting archives.
Many PD libraries or magazine disk editors realise the difficulty some
people experience with compressed files. To help these people out they
turn their archived files into the self extracting variety. The
majority of these come with the *.TOS file extension. To extract them
all you do is double click on the file as if running a program. The
most important thing to remember is to move them to a disk where there
is plenty of room for them to expand. Running them from the Atari
Computing cover disc for example is a definite no no. Some self
extracting files come with the extension *.SFX. To unpack these you
change the extension to *.TOS. You can then run them as I've just
explained.
These files are created using yet more TOS programs which can be accessed though all the shells mentioned. To create a self extracting Zip file you'd use zip2tos.prg, for Lharc files you'd use make_sfx.ttp. The self extracting files can be loaded into a shell and unpacked normally if you prefer.
Other programs that use compression.
There are many other programs that use archiving. Hard drive back up
utilities for instance. As the files are copied from your hard disk to
your floppies they can be compressed. Diamond Back for example carries
this out so quickly you would hardly notice.
Data Lite is a very clever little utility. It actually fools your Atari into thinking that your hard drive is bigger than it really is. This is done though compression. When you install Data Lite it compresses all the files on the target partition. Whenever you run a program from this partition or load a data file Data Lite expands the file on the fly into memory. It slows your computer down a little but is quite handy if hard drive space is becoming scarce.
Modems can also use compression. Each file the modem passes from your system to another it will try to compress. This makes a modem look quicker than it really is. Not a program I know, but a good example non the less.
In part two we'll discuss the setting up and use of Two In One and Pacshell. We'll also tell you how to send archived files via E-Mail.