|Everything HP200LX: Knowledge, Products, Service|
THE DOS CONNECTION: GAINING DISK SPACE ON THE HP 95LX THROUGH FILE COMPRESSION
HP 95LX users can save disk space using the free DIET.EXE compression program. This article assumes some working knowledge of MS DOS.
Introduction: What is Data Compression?
Storage space on the HP 95LX, like precious real estate, can be expensive and limited. The use of data compression programs can mean significant disk space savings on the HP 95LX's A drive and C drive.
Data compression simply means storing the same information (data files and program files) in less space. For example, if we could reduce the size of every 1-2-3 or MEMO data file or our PHONE book 40%, we would have that much more space left over for other files. Similarly, if we wanted to run our favorite DOS application on the 95LX, it would be great to be able to reduce the size of its main .EXE or .COM file.
Exactly how data compression works is beyond the scope of this article. However, in general terms a data compression program "translates" the "normal" way a file is stored and encoded into a more efficient encoding scheme.
There are two significant disadvantages to data compression. First there is usually some performance penalty since a file must be decompressed before it can be used by an application. For example, 1-2-3 only knows about WK1 data files not compressed WK1 files. Therefore, somehow compressed WK1 files must be decompressed before Lotus can use them.
Secondly, the compression/decompression program occupies some disk space. In addition, it usually requires extra disk space for temporary or permanent file storage. Some programs require extra system RAM to perform compression.
In most cases judicious use of compression techniques provide more benefits to 95LX users than detriments. Often, performance penalties are not significant on the 95LX. Most often, proper application of compression techniques results in significant disk space savings.
There are a number of data compression techniques available, each with their unique advantages and disadvantages. Data compression techniques and approaches will be a continuing theme in The HP Palmtop Paper through the years.
This article's author, Mark Scardina, is familiar with most common file compression approaches for MS DOS machines. He feels for generalized use, DIET.EXE* offers the best data compression approach for 95LX users (especially since DIET's author makes it available for free).
Criteria for Using a Compression Program on the HP 95LX
PC capacity has been increasing at a startling rate. We now have laptops with 16MB of RAM memory and 120MB hard drives, and the notebooks are closing fast. This huge capacity has allowed users to operate with little or no concern for space. Therefore, switching to the 95LX can be quite an experience for the user who demands more than an electronic organizer from the diminutive palmtop. This inevitably leads one to search for data compression programs to maximize the 95LX's available memory.
Since there is no specific compression software written for the 95LX,
the first task in picking a utility is to define those qualities most desirable
when used with the unique structure of the HP 95LX. The qualities of an
ideal 95LX file compressor include the following:
One such program that meets these criteria to a large extent is DIET by Terry Matsumoto.
There are two files that come with the DIET program: DIET.EXE and DIET.DOC. Only DIET.EXE needs to be copied to the 95LX. This file requires 22K of disk space. The text manual for DIET is DIET.DOC. It should be printed for reference.
DIET can be used manually. However, its real power is in its ability to be memory resident, which lets it perform its operations automatically.
Let's first look at a few examples of using DIET manually. We assume you have already copied DIET.EXE to your C drive.
Diet compresses all types of files by using the command:
EXAMPLE 1: Compress a program file:
DIET then displays a message that it is doing its thing. When it finishes, you'll see a message telling you how much it was able to compress ROLODEX.EXE. The good news about compressing .EXE or .COM files is that once you compress them you do not need DIET.EXE. ROLODEX.EXE, now, say 50K, executes just as before (perhaps takes a half second longer to load while it first decompresses itself).
EXAMPLE 2: Compress data files:
Standard DOS Command LINE options such as wildcards (* and ?) are available. For example, let's "diet" the files in your \_dat directory.
DIET becomes most useful on the HP 95LX when it is used as a memory resident application. See the sidebar for the particular memory resident installation instructions of DIET on the HP 95LX.
Once installed, DIET will automatically re-compress previously compressed files. This includes built-in software data files such as Lotus .WK1 files, MEMO .TXT files, and HPCALC .EQN files. It even compresses system compliant executable .EXM files.
Files automatically get recompressed only if DIET initially compressed them. In other words if you create a new 1-2-3 file named BUDGET.WK1, you must first enter DOS and then type diet budget.wk1 before gaining any compression advantages. Once a file has been DIETed, it will automatically be recompressed under the following condition. If you are in DOS and a data file is already DIETed, it will be recompressed automatically when the DOS application saves it. If you are running one of the built-in programs such as 1-2-3 or MEMO and save a DIETed file, at first the file will not be recompressed. However when you enter DOS and run any program (i.e. CHKDSK) the file will automatically get recompressed.
Therefore, you might create a simple batch file that you run from FILER periodically using the RUN command (press F4 from FILER. The file (named, say, COMPRESS.BAT) could contain the following lines:
The first command line above would compress any new MEMO .TXT files in the _DAT subdirectory. The second command line would compress all 1-2-3 .WK1 files in the root directory. At the same time any built-in software data files waiting to be compressed would get compressed automatically no matter in what subdirectory on what disk drive they reside.
Problems Using DIET
Possible problems in using DIET usually can be traced to three
before launching ROLODEX.EXE. You could also put the above SET command in your AUTOEXEC.BAT file.
In copying files with DOS COPY, DIET, if resident, will un-compress the files first. If you would like them to remain compressed, issue the command:
diet -c <destination> <filenames>.
3. INSUFFICIENT SYSTEM RAM MEMORY--Finally, in our experimentation we find you need at least 170K of System RAM in DOS for DIET to run smoothly. If you receive an "In-sufficient memory" error, use CHKDSK to determine how much System RAM you have. Then return to SYSMGR and use the SETUP function (<Shift>-<FILER>) to increase your memory. An extra 24K of system RAM is used by DIET to remain memory resident. We will be interest-ed in reports from other users as to how much total system RAM they need.
In creating your strategy for using DIET, you should keep the following guidelines in mind:
First, DIET is as efficient as the best compression utilities available. This also means that it will slow down the loading and unloading of your programs. Speed this process by selectively DIETing your files.
Second, anytime DIET requires a temporary file, that disk space (the original uncompressed file size) cannot be used while the program is running. Therefore, you have to decide whether DIETing that file gives you a net saving in disk space, as it takes up in disk space its compressed plus original size.
A Final Warning
I have used DIET for over a month without major problems. However, backing up your files to a PC on a regular basis is always a good idea. It's especially a good idea while you gain experience and confidence in using DIET.
This approach is experimental, and although it seems to be very effective, you should use it at your own risk. If you have problems, or find ways of improving this technique, please send me or Hal Goldstein a CompuServe message, or write The HP Palmtop Paper.
To many people the 95LX's memory limitations may seem a throwback to the days of the original IBM XT. What they need to consider is the efficient compression software developed by many clever programmers since then. Hewlett-Packard's internal code name for the HP 95LX was JAGUAR, and it seems only fitting to use a program called DIET to keep it "lean and mean."
DIET is free and available on many public bulletin boards or on CompuServe. On CompuServe you can find it in the IBMSYS forum, File Utilities Library. As of September, 1991 it was named DIET12.EXE. To extract DIET.EXE and DIET.DOC type diet12 from the DOS prompt. The copy of DIET.EXE used for this article was dated 8/20/91.
Palmtop Paper subscribers will receive DIET.EXE at no charge on the 1992 Palmtop Paper Subscribers Disk sent with Volume 1., No 2. issue (March/April 1992).
Finally, Palmtop Paper subscribers may obtain DIET.EXE as part
of The HP Palmtop Paper On Disk, Issue 1. See page 36 for a description
of this service.
Copyright © 2010 Thaddeus Computing Inc