Microsoft KB Archive/97564

{|
 * width="100%"|

Compressed Drives and Visual C++ Setup

 * }

Q97564

-

The information in this article applies to:

Microsoft Visual C++, versions 1.0, 1.5, 1.51, 1.52

Compressed drives created by one of the following:

- Digital Research DR-DOS version 6.0 SUPERSTORE

- Microsoft MS-DOS version 6.0 DBLSPACE

- Stac Electronics STACKER

-

SUMMARY
The Microsoft Visual C++ Setup program generally provides accurate information about the available free disk space and the space required to install selected files. However, if Setup installs files on a compressed drive, the information about available free disk space may be inaccurate and Setup may fail because insufficient space is available to install the selected files.

MORE INFORMATION
To the operating system, a compressed drive is effectively a data file. To access data in the compressed drive, the boot process installs a device driver that emulates a disk drive device. The driver processes all interrupt calls that pertain to the emulated device. The driver uses a data compression algorithm to store and retrieve data as files in the large file that the underlying operating system manages.

The data compression algorithm processes each data set (file) individually; the actual amount of compression varies from file to file. The data compression software tracks the average compression ratio on the compressed drive and uses this ratio to estimate the amount of free space on the drive.

For example, consider the case in which the operating system creates a 100 MB file for the compressed drive. If you store 100 MB of data into this drive at a 50% compression ratio, the data requires only 50 MB. At this point, the compression software reports that the compressed drive can hold 200 MB and that it has space available for 100 MB. However, the true amount of space free is the 50 MB of unused space in the file as reported by the operating system. If the compression software cannot store subsequent data sets at the reported 50% compression ratio, the compressed drive does not have 100 MB free.

This factor becomes critical in a setup program such as Visual C++ Setup. In particular, Microsoft Windows Help files may already be compressed to a great extent because part of the process to build a Help file can include data compression. If the data compression software reports 3 MB free disk space (its estimate) and Setup has a 3 MB Help file to install, Setup attempts the installation. However, this process fails because the Help file cannot be compressed to the same extent as previous data sets and it does not fit onto the compressed disk.

To illustrate this phenomenon with a concrete example, consider the amount of free space available on a compressed drive before and after copying a Windows Help file. Before copying the file to a DBLSPACE drive, the following calculation appears reasonable:

  Space available on Compressed Drive D:   8,790,016 Copy WIN31WH.HLP to D: -3,390,373 Amount that should result:  5,399,643 However, after copying the file, DBLSPACE reports the following amount of space free:

  Actual free space reported after copy:   2,949,120 At this point, an attempt to copy MFC.HLP (size 2,222,523) to this drive fails due to insufficient free space.

NOTE: Under Visual C++ 1.5 the size of WIN31WH.HLP is 3,386,753 bytes. The size of and MFC.HLP is 2,725,211 bytes.

This behavior may cause the Visual C++ Setup program to fail unexpectedly when it copies data to a compressed drive. This behavior has no general solution; it is caused by a limitation of the methods used to create and maintain compressed drives. Neither the compression software nor the setup program can determine in advance how a given file will respond to the compression algorithm. The only option available involves attempting to compress the file and failing gracefully if it does not fit.

Additional query words: kbinf 1.00 1.50

Keywords : kb16bitonly

Issue type :

Technology : kbVCsearch kbAudDeveloper kbvc150 kbvc100 kbVC151 kbVC152