BAPACK

From Atari Wiki
Revision as of 12:29, 12 October 2011 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Branch Always Packer 1.00
=========================

(C) Branch Always Software, 1990. All rights reserved.

released: January 19, 1990


The file BAPACK.ACC and this text file make up the BA Pack 1.00 release.
This is a freeware release, and may be used by all Atari ST users. The
software may be copied freely. It may not be modified, disassembled, or
used for commercial purposes.


What is BA Pack?
================

BA Pack is an executable program packer. It takes an existing program,
which may have a .PRG, .TOS, .TTP, or .ACC extender, and creates a file
which is smaller but still remains executable. This frees up disk space,
and allows more programs to fit on a floppy disk or hard disk. Desk
accessories as well as normal applications can be packed.

For example, the size of Flash 1.6 drops from 135K to 97K, a savings of
about 38K of disk space. Calamus drops in size by about 80K. The larger
the program, the more the savings. Typical programs will compress to
about 50% to 80% of their original size. BAPACK.ACC itself is packed.
On a standard 360K single sided floppy disk, it is usually possible to
free up about 100K of disk space, simply by packing the programs on the
disk.

We tested BA Pack on dozens of different programs, like Flash, Calamus,
Word Writer, ST Writer, Tempus, Laser C, ARC, ARC Shell, Quick ST, etc,
and all the programs worked perfectly when packed.

The reason that BA Pack was written in the first place was to allow
us to put more files on our upcoming software releases. We looked at
several alternatives:

    - use a double sided 720K disk - 520ST users would kick and scream
    - self extracting ARCs - this requires more disk space for extraction
    - ARC the files - this requires ARC.TTP (which eats more disk space)
                      and some people may not be familiar with ARC.
    - use two disks - this raises the price of the software

All 4 of the above alternatives were unacceptable, so BA Pack was written.


Differences between PACKing and ARCing
======================================

A program packer is slightly different than a normal ARCing program.
The two main characteristics of a file compression program are the
efficiency of compression, and the speed of decompression (or unpacking).

Programs like LHARC offer very good compression of files, but they take
a long time to do the decompression. A program like ARC is slightly
faster but doesn't compress as well. BA Pack is even faster than ARC,
but does not compress as efficiently. The reason is simple. A packed
program must unpack very quickly, otherwise it will annoy users if they
have to wait a minute or two each time they double click on a program.

So there is a tradeoff between compression efficiency and pack/unpack time.
BA Pack performs the packing and unpacking operations entierly in memory,
so it is extremely fast, but as a result, the packed programs are larger
than what could be obtained by using ARC or LHARC.

The algorithm that BA Pack uses is also different than what ARC might use.
There is a compression scheme known as Huffmann encoding, which is widely
used for compressing files. Unfortunately, Huffmann encoding and decoding
is not terribly fast. The compression scheme used by BA Pack, although 
quite "brain dead", is effective nevertheless. It works on the fact that
a program will tend to have a lot of repeating 68000 instructions, since
there are just a limited number of instructions in common use. But you
don't have to worry about how BA Pack works!

In future releases we will experiment with other methods of compression
which may be slower or faster, smaller or larger. The current method
was chosen as the best compromise between speed and packed size.

There is another consideration that makes BA Pack slightly different.
If you try to pack a program that is smaller than 1K, BA Pack won't let
you do it. The reason is that the ST allocates disk space 1K at a time. So
it doesn't matter if a file is 5 bytes long or 995 bytes long, it still 
uses up 1K (1024 bytes) of disk space. Therefore, since our main goal is
to save disk space, it is unnecessary to try performing packs that save
less than 1K of disk space.

BA Pack also displays all file sizes in terms of kilobytes rather than
bytes, since the actual number of bytes is somewhat unimportant.

When a packed program is run, it performs all the unpacking in memory, at
a rate of about 30K per second. On a floppy disk system, this will usually
mean that a packed program loads faster than the unpacked program, because
the time spent unpacking is less than the time it would take to load the
larger unpacked program.

When running a packed program from a hard disk or RAM disk, the load time
will usually be too fast to make a difference. There will be a slight
delay on large files as the program unpacks. This may take up to 5 seconds
on very large files.


Using BA Pack
=============

BA Pack uses an intuitive GEM based interface. There is currently only
one operation supported: packing. For our purposes it was not necessary
to have an unpack feature. We also recommend that whenever you pack a file,
you should always keep a backup of the original unpacked version. This is
so that the original file can be used for such purposes as ARCing, or
patching (a method of updating programs). There are programs out there,
such as ARC Shell, which store configuration information right in the
program file itself, so when changing the configuration, you must have
the unpacked version handy.

BA Pack runs as a desk accessory or an application. To install is as a
desk accessory, simply rename it to BAPACK.ACC and copy it to the root
directory of your boot disk. To run it as an application, rename the
file to BAPACK.PRG and run it from the desktop.

Programs that are already packed should not be packed again, since this
will not reduce the size of the program further. BA Pack is already 
packed.

In addition to the memory required to load the unpacked file into memory,
BAPACK uses about 300K of memory for the packing process. Therefore it
is almost a must to have at least a megabyte of memory. The memory is
required for the fast packing process we regret if this causes an
inconvenience to 520ST users. The unpacking of a packed file does not
require any additional memory.

To go and pack, run BA Pack and click on the button marked "Pack a program".
Two file selectors will pop up in succession. The first one is for
specifying the file to pack, i.e. the original unpacked program. When
that is done, the second file selector will come up and you must type
in the name of the packed file. The packed file does not exist yet, but
in case you do select an already existing file, it will prompt you to make
sure. Once both the packed and unpacked files are selected, BA Pack will
go and pack. This will take from a few seconds to a minute, depending on
the size and complexity of the unpacked file.

You can also click on "Packed file statistics" to check the compression
of a packed file, or to check whether a file is already packed or not.

To avoid confusion, we recommend the use of the .APP extender on packed
files. For example, if you pack Flash 1.6, the unpacked file name is
FLASH.PRG, and the packed file name is FLASH.APP. Although APP stands for
APPlication, it is so seldom used that it could just as well mean
A Packed Program.

Make sure that when packing, there is enough room on the disk for the
packed file that will be created.

Under no circumstances should the packed and unpacked files be the same
file! If you do not want the unpacked file, copy it to a floppy disk for
future use.


The future of BA Pack
=====================

BA Pack was written for a very specific purpose, and was not intended to
be yet another ARC program. However, even using the current brain dead
compression scheme, it is possible to compress non-program files, such as
text files, quite well. For example, typical text compresses by about 40%.

The main advantage of BA Pack on non-program files as we see it would be
its speed of packing and unpacking. If users demand it, BA Pack will be
expanded into a full blown ARC-like program, with compression, decompression,
archive listings, multiple file support, and other features.

So, please vote on the future of BA Pack. Send us your responses by email or
regular mail. Please answer as many of the following questions as possible.

Q1: Do you find BA Pack useful for packing programs?

Q2: Will you continue to use it in its current state?

Q3: Would you like the ability to pack non-program files (such as text
    files, graphics files, etc) given the current speed of compression and
    efficiency of compression?

Q4: If the answer to Q3 was Yes, would you like to see BA Pack use its own
    built-in GEM based shell, or should it be made comptible with ARC.TTP so
    that it can be used with ARC Shell?
   
BA Pack will remain freeware, although we reserve the right to make
non-freeware versions for distribution with future Branch Always products.

 Branch Always Software
 Box 2624, Station B
 Kitchener, Ontario  N2H 6N2
 Canada

 phone: (519)-570-4340 or (519)-747-0386

 Compuserve: 73657,2714
 GEnie: DAREKM


Current versions
================

These are the current versions of current Branch Always products:

Quick ST 1.8, available at Atari dealers for $19.95.

Quick Find 1.7, Quick Inf 1.7, Quick Label 1.7, Quick View 1.61 -
these programs were part of the Quick Utilities shareware package, which
is being replaced by a new cheaper package very soon now!

To update to the latest versions, mail in your original Quick ST or
Quick Utilities disk and $3 and you will receive the updated disk.

Well, that's about all our products for now! Please check your local
bulletin board or online service on March 2, 1990 for the announcement
of our new commercial software products.

We also have Compilation Disks available for $9.95. See the "About" boxes
in BA Pack for more information.

Also be on the lookout for our upcoming "STe Demos", which will be
uploaded to the bulletin boards and online services. These will include
4096 color graphics demos, digital stereo sound demos, and more! You will
of course need an Atari STe computer, but these are readily available now
everywhere but in the United States. They're really cheap here in Canada.

Note: to date, we have found that the following popular programs do not
      run on the Atari STe: Neodesk 2, Hotwire, UIS II, Vkiller. If you
      try to pack them using BA Pack, they will still not work!

Don't forget to vote on the future of BA Pack!


Back to Packer/Depacker