CAB Archive: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
m (Ikskoks moved page Microsoft Cabinet to Microsoft Cabinet CAB)
imported>Ikskoks
No edit summary
Line 1: Line 1:
[[Category:Game_Microsoft Cabinet | Game: Microsoft Cabinet]]
{{GRAFPageHeader}}
[[Category:Complete_Complete | Status: Complete]]
== CAB ==
[[Category:Extension_cab | Extension: cab]]
 
{{CompactGRAFTOC}}
* ''' Format Type ''':   Archive <br>
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>
* ''' Signature ''':   MSCF <br>
* ''' Alternative Names ''': Microsoft Cabinet CAB <br>
 
 
=== Format Specifications ===


<div style="border:solid 1px #AAAAAA; padding:4px; background-color:#F9F9F9;">
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:1000px; overflow:auto;">
<i>Format Type:</i> Archive<br />
<i>Extensions:</i> cab <br />
<i>Platforms:</i> <i>unknown</i><br />
<i>Endian Order:</i> Little Endian
</div>
[[Category:Format_Archive | Type: Archive]]
<br /><br />
== Format Specifications ==
<div style="border:solid 1px #AAAAAA; padding:4px; background-color:#F9F9F9; font-weight:bold;">
<div style="border:solid 1px #AAAAAA; padding:4px; background-color:#F9F9F9; font-weight:bold;">
<tt>
<tt>
<font color="blue"><i>CFHEADER</i></font><br />
<font color="blue"><i>CFHEADER</i></font><br />
&nbsp;&nbsp;uint32 {4}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Header <font color="purple">(MSCF)</font><br />
&nbsp;&nbsp;uint32 {4}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Signature <font color="purple">(MSCF)</font><br />
&nbsp;&nbsp;uint32 {4}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Reserved  <font color="purple">(null)</font><br />
&nbsp;&nbsp;uint32 {4}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Reserved  <font color="purple">(null)</font><br />
&nbsp;&nbsp;uint32 {4}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Archive Length<br />
&nbsp;&nbsp;uint32 {4}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Archive Length<br />
Line 99: Line 97:
</div>
</div>
<br /><br />
<br /><br />
== MultiEx BMS Script ==
</div>


<tt>
=== Notes and Comments ===
<i>No BMS script</i>
 
</tt>
*  CAB is an archive file format for Microsoft Windows
<br /><br />
 
[[Category:BMS_None | BMS: None]]
=== Games ===  
== Supported Programs ==
List of games using this file format:
* TODO


* [[Game Extractor|Game Extractor]]<br />
=== QuickBMS Script ===  
<br /><br />
[[Category:Program_Game_Extractor | Program: Game Extractor]]
== Notes ==


<i>No additional notes</i>
Not written yet.
<br /><br />
[[Category:CE_None | Compression: None]]
== Games ==


* Microsoft Cabinet
=== Compatible Programs ===  
<br /><br />
== Navigation ==


{{Format Navigation}}
* Game Extractor
<br /><br />
* makecab.exe / cabarc.exe (in C:\WINDOWS\system32)
<br/><br>




[[Category:Complete Complete|CAB Archive]]
[[Category:Platform PC|CAB Archive]]
[[Category:CE Compressed|CAB Archive]]
[[Category:Format_Archive | Type: Archive]]
[[Category:Extension_cab | Extension: cab]]
[[Category:BMS_None | BMS: None]]
[[Category:File Format]]
[[Category:File Format]]

Revision as of 11:36, 13 February 2022

Back to index | Edit this page

CAB

  • Format Type : Archive
  • Endian Order : Little Endian
  • Signature : MSCF
  • Alternative Names : Microsoft Cabinet CAB


Format Specifications

CFHEADER
  uint32 {4}       - Signature (MSCF)
  uint32 {4}       - Reserved (null)
  uint32 {4}       - Archive Length
  uint32 {4}       - Reserved (null)
  uint32 {4}       - Offset to the first CFFILE
  uint32 {4}       - Reserved (null)
  byte {1}         - Minor Version (3)
  byte {1}         - Major Version (1)
  uint16 {2}       - Number of Folders
  uint16 {2}       - Number of Files
  uint16 {2}       - Flags
  uint16 {2}       - Cabinet Set ID Number
  uint16 {2}       - Sequential Number of this Cabinet file in a Set
  if (flags & 4){
    uint16 {2}       - Header Reserve Size
    byte {1}         - Folder Reserve Size
    byte {1}         - File Reserve Size
    if (HeaderReserveSize != 0){
      byte {X}         - Reserve Data (length = HeaderReserveSize)
      }

    }

  if (flags & 1){
    byte {0-255}     - Previous CAB Filename
    byte {1}         - null Filename Terminator
    byte {0-255}     - Previous Disk Name
    byte {1}         - null Disk Name Terminator
    }

  if (flags & 2){
    byte {0-255}     - Next CAB Filename
    byte {1}         - null Filename Terminator
    byte {0-255}     - Next Disk Name
    byte {1}         - null Disk Name Terminator
    }

for each Folder
  CFFOLDER
    uint32 {4}       - Offset to the first CFDATA in this Folder
    uint16 {2}       - Number of CFDATA blocks in this Folder
    uint16 {2}       - Compression Format for each CFDATA in this Folder (1 = MSZIP)
    if (flags & 4){
      byte {X}         - Reserve Data (length = FolderReserveSize)
      }

for each File
  CFFILE
    uint32 {4}       - Uncompressed File Length
    uint32 {4}       - Offset in the Uncompressed CFDATA for the Folder this file belongs to (relative to the start of the Uncompressed CFDATA for this Folder)
    uint16 {2}       - Folder ID (starts at 0)
    uint16 {2}       - File Date
    uint16 {2}       - File Time
    uint16 {2}       - File Attributes
    if (FileAttributes & 64){
      byte {X}         - Filename (Unicode)
      byte {2?}        - null Filename Terminator
      }

    else {
      byte {X}         - Filename (ASCII)
      byte {1}         - null Filename Terminator
      }

for each File
  CFDATA
    uint32 {4}       - Checksum
    uint16 {2}       - Compressed Data Length
    uint16 {2}       - Uncompressed Data Length
    if (flags & 4){
      byte {X}         - Reserve Data (length = FileReserveSize)
      }

    byte {X}         - Compressed Data

MSZIP COMPRESSION
  for each compressed block (uncompressed size of the block is at most 32k)
    uint16 {2}       - Zip Header (67, 75)
    byte {X}         - Compressed Data (Deflate)



Notes and Comments

  • CAB is an archive file format for Microsoft Windows

Games

List of games using this file format:

  • TODO

QuickBMS Script

Not written yet.

Compatible Programs

  • Game Extractor
  • makecab.exe / cabarc.exe (in C:\WINDOWS\system32)