ArticleslgStudy

science

Cabinet (file format)

Cabinet (file format) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Cabinet (file format) rather than just read about it. In short: Cabinet (or CAB) is an archive-file format for Microsoft Windows that supports lossless data compression and embedded digital certificates used for maintaining archive integrity. Cabinet files have .cab filename extensions and are recognized by their first four bytes (also called their magic number) MSCF.

Cabinet (file format) — main illustration
Cabinet (file format) — illustration

Key takeaways

  • Cabinet (file format) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Cabinet (file format) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Cabinet (file format) from memory before moving on to harder problems.

Reference excerpt

Cabinet (or CAB) is an archive-file format for Microsoft Windows that supports lossless data compression and embedded digital certificates used for maintaining archive integrity. Cabinet files have .cab filename extensions and are recognized by their first four bytes (also called their magic number) MSCF. Cabinet files were known originally as Diamond files.

Design A CAB archive can contain up to 65,535 folders (distinct from standard operating system directories), each of which can contain up to 65,535 files for a maximum of 4,294,836,225. Internally, each folder is treated as a single compressed block, which provides more efficient compression than individually compressing each file. Every entry in a folder has to be a file. Due to this structure, it is not possible to store empty folders in CAB archives. The following shows an example a CAB file structure, demonstrating the relationship between folders and files:

How paths should be handled is not specified in the CAB file format, leaving it to the software implementation:

Some affix file paths to filenames only, as if all files in a CAB archive are in a single folder. IExpress works this way, as does Microsoft Windows Explorer, which can open CAB archives as a folder. Some can store the paths, and upon extraction, create folders as necessary. CABARC.EXE and EXTRACT.EXE (tools from Microsoft Cabinet SDK) as well as lcab and cabextract (third-party open-source tools) work this way. EXPAND.EXE, only since version 6 (which is included from Windows Vista to above) can extract files to their paths. The previous versions don't do it. The CAB file format may employ the following compression algorithms:

DEFLATE: invented by Phil Katz, the author of the ZIP file format (specifically, the MSZIP encapsulation) Quantum compression: licensed from David Stafford, the author of the Quantum archiver (not available in all versions of makecab.exe/diamond.exe) LZX: invented by Jonathan Forbes and Tomi Poutanen, given to Microsoft when Forbes joined the company NULL: stored A CAB archive can reserve empty spaces in the archive as well as for each file in the archive, for some application-specific uses like digital signatures or arbitrary data.

Implementations

Microsoft Windows supports creating CAB archive files using the makecab command-line utility. It supports extracting the contents of a CAB archive files using File Explorer, Setup API, and using the command-line commands expand.exe, extract.exe and extrac32.exe. Other well-known software with CAB archive support includes WinZip, WinRAR or 7-Zip. The aforementioned cabextract is a common tool for Linux systems, but is only capable of extracting archives. The gcab tool however can both extract and create CAB archives. For a full list, see Comparison of file archivers § archive formats.

Uses A variety of Microsoft installation technologies use the CAB format: these include Windows Installer, Windows Setup (from Windows 95 to Windows Server 2003), Setup API, Device Installer, Theme Pack and AdvPack (used by Internet Explorer to install ActiveX components). CAB files are also often associated with self-extracting programs like IExpress where the executable program extracts the associated CAB file. CAB files are also sometimes embedded into other files. For example, MSI and MSU files usually include one or more embedded CAB files. Windows uses the cabinet format to archive its Component-Based Servicing (CBS) log, which is kept in the folder C:\Windows\Logs\CBS. A bug in the compression process can cause run-away generation of useless log files both in that folder and in C:\Windows\Temp, which can consume disk storage until completely filling the hard drive. Deletion of the files without following a specific procedure can cause the deleted files to be regenerated at an increased pace. On Linux systems, CAB archives are used by fwupd to distribute firmware updates from hardware vendors that can be flashed on non-volatile memory.

Related formats The .cab filename extension is also used by other installer programs (e.g. InstallShield) for their own proprietary archiving formats. InstallShield uses zlib for compression (see Deflate), but their headers are not the same as for Microsoft CAB files so they are incompatible and cannot be manipulated or edited with the programs that are made for standard cabinet format. Specialized third-party utilities, such as Unshield, can extract this specific proprietary format. This format has a different magic number of ISC(. Windows CE and Windows Mobile software is distributed as CAB files where the first file inside, ending with extension ".000", details how it is installed. Microsoft Installer .msi files sometimes contain CAB files, but are themselves in the Compound File Binary Format which has to be decoded first. Software like lessmsi can be used to unpack these files. Microsoft Publisher has a "Pack and Go" feature that bundles a publisher document, together with all external links, into a CAB file with a .PUZ extension. These files are meant to be activated with a companion .EXE file which is distributed along with the .PUZ file. These files may be opened with any CAB file extraction program.

See also List of archive formats

References

External links

Microsoft Cabinet SDK – updated versions of these resources are available in the Microsoft Windows SDK Cabinet Software Development Kit (CAB SDK) – downloads of all Microsoft CAB SDK versions (free)

Worked examples

Example 1 — a first encounter with Cabinet (file format)

Start with the simplest possible case. Write down what Cabinet (file format) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Cabinet (file format) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Cabinet (file format) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Cabinet (file format)

In research
Cabinet (file format) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Cabinet (file format) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Cabinet (file format) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Archive formats, Windows administration, Windows commands, so understanding it makes those chapters shorter.
In everyday life
Look for Cabinet (file format) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Cabinet (file format)” →

How to study Cabinet (file format) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Cabinet (file format) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Cabinet (file format) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Cabinet (file format) in simple terms?

Cabinet (or CAB) is an archive-file format for Microsoft Windows that supports lossless data compression and embedded digital certificates used for maintaining archive integrity. Cabinet files have .cab filename extensions and are recognized by their first four bytes (also called their magic number…

Why does Cabinet (file format) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Cabinet (file format)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Cabinet (file format).

Tags

  • Archive formats
  • Windows administration
  • Windows commands

Keep exploring