Cabinet (file Type)
   HOME

TheInfoList



OR:

Cabinet (or CAB) is an archive-file format for
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
that supports lossless data compression and embedded digital certificates used for maintaining archive integrity. Cabinet files have .cab
filename extension A filename extension, file name extension or file extension is a suffix to the name of a computer file (e.g., .txt, .docx, .md). The extension indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
s 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 65535 ''folders'' (distinct to standard operating system directories), each of which can contain up to 65535 files for a maximum of 4294836225. 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.Microsoft Cabinet Format
/ref> 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: * CAB file ** First folder *** *** ** Second folder *** *** 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 IExpress, a component of Windows 2000 and later versions of the operating system, is used to create self-extracting packages from a set of files. Such packages can be used to install software. Overview IExpress (IEXPRESS.EXE) can be used for dis ...
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. and (tools from Microsoft Cabinet SDK) as well as and (third-party
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
tools) work this way. * , 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 Phillip Walter Katz (November 3, 1962 – April 14, 2000) was a computer programmer best known as the co-creator of the Zip file format for data compression, and the author of PKZIP, a program for creating zip files that ran under DOS. A c ...
, 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 Jonathan Forbes (born 4 December 1976 in Dublin) is an Irish actor. Early life Forbes was born in Dublin, Ireland on 4 December 1976. He attended Gonzaga College where he was in the same class as fellow actor Andrew Scott, before studying En ...
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 Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
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,expand - Windows CMD - SS64.com
/ref> extract.exe and extrac32.exe.
/ref> Other well-known software with CAB archive support includes
WinZip WinZip is a trialware file archiver and data compression, compressor for Microsoft Windows, macOS, iOS and Android (operating system), Android. It is developed by WinZip Computing (formerly Nico Mak Computing), which is owned by Corel, Corel Co ...
,
WinRAR WinRAR is a trialware file archiver utility for Windows, developed by Eugene Roshal of win.rar GmbH. It can create and view archives in RAR (file format), RAR or Zip (file format), ZIP file formats, and unpack numerous archive file formats. To en ...
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 .


Uses

A variety of
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
installation technologies use the CAB format: these include Windows Installer, Setup API,
Device Installer A device is usually a constructed tool. Device may also refer to: Technology Computing * Device, a colloquial term encompassing desktops, laptops, tablets, smartphones, etc. * Device file, an interface of a device driver * Peripheral, any devic ...
, Theme Pack and AdvPack (used by
Internet Explorer Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated IE or MSIE) is a series of graphical user interface, graphical web browsers developed by Microsoft which was used in the Microsoft Wind ...
to install ActiveX components). CAB files are also often associated with self-extracting programs like
IExpress IExpress, a component of Windows 2000 and later versions of the operating system, is used to create self-extracting packages from a set of files. Such packages can be used to install software. Overview IExpress (IEXPRESS.EXE) can be used for dis ...
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 . A bug in the compression process can cause run-away generation of useless log files both in that folder and in , 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 Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
systems, CAB archives are used by fwupd to distribute
firmware In computing, firmware is a specific class of computer software that provides the low-level control for a device's specific hardware. Firmware, such as the BIOS of a personal computer, may contain basic functions of a device, and may provide h ...
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 InstallShield is a proprietary software tool for creating installers or software packages. InstallShield is primarily used for installing software for Microsoft Windows desktop and server platforms, though it can also be used to manage software a ...
) for their own proprietary archiving formats. InstallShield uses
zlib zlib ( or "zeta-lib", ) is a software library used for data compression. zlib was written by Jean-loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. zlib is also a ...
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 . Windows CE installer uses a variant of Microsoft CAB format with a magic. The compression is typically NONE, but MSZIP can also be found. 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 Microsoft Windows SDK, and its predecessors Platform SDK, and .NET Framework SDK, are software development kits (SDKs) from Microsoft that contain documentation, header files, libraries, samples and tools required to develop applications for Micr ...

Cabinet Software Development Kit (CAB SDK)
– downloads of all Microsoft CAB SDK versions (free) {{Use dmy dates, date=June 2013 Archive formats Windows administration