Filename extension | .cab |
---|---|
Internet media type | application/vnd.ms-cab-compressed |
Uniform Type Identifier (UTI) | public.archive.cab |
UTI conformation | public.data public.archive |
Magic number | MSCF |
Developed by | Microsoft |
Type of format | Archive file format |
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 4 bytes MSCF. Cabinet files were known originally as Diamond files.
The CAB file format may employ the following compression algorithms:
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. CAB format is used by a variety of Microsoft installation technologies including Windows Installer, Setup API, Device Installer 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 (the latter are CAB files with just another filename extension) usually included one or more embedded CAB files.
A CAB archive can contain up to 65535 CAB-folders, (not to be confused with file system folders) each can contain up to 65535 files. Internally, each CAB-folder is treated as a single compressed block, which provides more efficient compression than individually compressing each file.
Every entry in a CAB-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 CAB-folders and files:
How paths should be handled is not specified in the CAB file format, leaving it to the software implementation.