Classic Computer Magazine Archive COMPUTE! ISSUE 123 / NOVEMBER 1990 / PAGE A-24

DOWNLOAD
FIGHT CODE BLOAT WITH POWER PACKER

SHELDON LEEMON

Does your hard disk suffer from that too-full feeling? Is your Workbench disk bursting at the seams? Do your floppies seem to be shrinking? If so, you may be suffering from code bloat. While not as well known a problem as the computer virus, code bloat is far more widespread and consumes a much greater portion of our precious resources.

Code bloat is the common term for programmus expandus, the process by which programs seek to fill all available memory space. Not long ago, when 16K was all the memory a personal computer had, everybody wrote tight little programs in assembly language. Remember the 8K BASIC interpreter? But as memory capacities and computer capabilities grew, so did the appetites of programmers. They started using high-level languages that produced larger code and began to add sophisticated user interfaces and tons of new features. As a result, almost every program has turned into a multidisk extravaganza. The worst part is that our disk drives haven't gotten any bigger. An 880K floppy can look pretty skimpy when programs start ballooning out to 300K or 400K in size.

If code bloat is getting you down, maybe it's time you tried Power Packer. Power Packer is a compression program, similar to programs like arc and zoo that are used to reduce the size of programs for transmission over phone lines. Instead of crunching a bunch of files together, however, Power Packer only works on single files. And when it crunches program files, Power Packer adds a 500-byte program that automatically uncrunches and runs them when invoked. What you end up with is a program file that takes up about half as much space on your disk and loads more quickly from a floppy, yet it works identically to the bloated version.

Compression programs like Power Packer have been around for quite a while in Europe, probably because it has more single-floppy systems. What makes Power Packer really special is its wide range of features and its well-planned user interface.

To crunch a program file, simply choose Load from the Project menu and use the file requester to select a program to crunch. If it's a valid program file, the crunch process will begin automatically and a progress report will appear in the status window. (If not, you'll see an error message in the status window.) Once it has finished crunching, you can save the new version by selecting the Save item from the Project menu. It's a good idea not to overwrite the old file until you've tested the crunched version, however. Some crunched programs (such as the CLI commands that were written in BCPL) will not run correctly.

Power Packer offers a number of options on its Prefs menu, the most important of which are Efficiency and Decrunch Color. Efficiency refers to the method used to pack the file—the longer the program takes to crunch, the better the job it does, and the smaller the resulting file. There are five speeds, ranging from Fast to Best, but I've found the default middle speed, Good, to be the best compromise between speed and efficiency.

The Decrunch Color setting is strictly a matter of personal taste. Most of the European crunchers change the screen colors while unpacking the file to let you know that something is happening even though it looks like the program has stopped loading and isn't going to run. Power Packer gives you the choice of four different changes it can make to the display while uncrunching, the least obtrusive of which is cycling the pointer colors. It also gives you a No Display option.

Executable program files are divided into hunks, fragments of program code and data along with location information for loading them at the correct spot in memory. Although Power Packer can handle most hunk types, it can't compress programs that contain overlay hunks. Such programs include Professional Page, Deluxe-Paint III, and Sculpt-Animate 4D. Symbol and debug hunks, which are only used for debugging purposes by the program's author and should have been removed before the program was distributed, are automatically removed when you select Power Packer's Process or Process & Crunch items from the Hunklab menu.

When used properly, Power Packer can be a very effective remedy for code bloat. It has allowed me to squeeze about 20 percent more storage space out of my hard disk and to shoehorn past "Best of the Boards" programs onto an already-jammed Amiga Resource Disk. Although Power Packer compresses data files as well as program files, it can't decompress them automatically, so it's not much more useful for this purpose than arc and other compression programs. There is a PPMore program included with Power Packer, however, which can display both regular and compressed text files, so you may want to crunch your document, also.

In Power Packer, Nico François of Power Peak has produced an outstanding piece of shareware. If this program becomes a regular part of your software arsenal, as it has mine, be sure to send a few francs Nico's way. You'll more than make up for it in savings on disks.