2.10. Compressed Files

The 32-bit APIs have a small extension library that works with compressed files. The compress command creates a compressed file that you can either decompress to a new file during your application's execution, or read from directly, without decompressing it at all. See Figure 2.3. Certain types of files compress very efficiently. For example, many different types of bitmap files compress at a 90% level or better, and most text files achieve a 50% compression factor. The ability to read compressed files directly allows you to keep certain files in a compressed format to save disk space.

Figure 2.3. Creating and accessing a compressed file

In order to test the compressed file facility, you need a file to compress. The ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.