Microsoft SDK for Java

Creating and Using Cabinet Files

The cabinet format is an efficient way to package multiple files. The cabinet format has two key features: multiple files can be stored in a single cabinet (.cab) file, and data compression is performed across file boundaries, which significantly improves the compression ratio. Cabinet file construction can be designed based on the number of files to be compressed and the expected patterns for gaining access to them (sequential, random, all at once, or a few at a time).

A key concept of the cabinet file is the folder. A folder is a collection of one or more files that are compressed as a single entity. Compressing files in folders instead of individually improves the compression ratio. Random access time suffers, however, because decoding (decompressing) any file in a folder requires that all preceding files in that folder must also be decoded. Because the cabinet format is designed to deliver file content, rather than to stream media, the focus is on maximum compression as opposed to quick decompression.

There are two reasons to use the cabinet technology with Java classes:

The Microsoft SDK for Java provides the cabarc utility that creates, extracts, and lists the contents of cabinet files. Cabarc uses a command-line interface similar to that of popular archiving tools, and supports wildcards and recursive directory searches. For details on this utility's command-line options, see the cabarc section of the Tools Reference.

Note   The dubuild utility is an alternative to cabarc when distributing software using Microsoft® Internet Explorer 4.0. The dubuild utility creates distribution units (DUs) that are installed using the Java Package Manager (JPM). For more information, see Creating and Using Distribution Units (dubuild) and Java Package Manager.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.