CAB Archive: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>WATTO
(Created page with " Game: Microsoft Cabinet Status: Complete Extension: cab {{CompactGRAFTOC}}...")
imported>Ikskoks
 
(15 intermediate revisions by the same user not shown)
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 File / Cabinet <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>
 
=== Notes and Comments ===
 
*  CAB is an archive file format for Microsoft Windows
 
=== Games ===
List of games using this file format:
* TODO


<tt>
=== QuickBMS Script ===
<i>No BMS script</i>
 
</tt>
Not written yet.
<br /><br />
 
[[Category:BMS_None | BMS: None]]
=== Compatible Programs ===
== Supported Programs ==
 
* 7-zip
* Game Extractor
* makecab.exe / cabarc.exe (in C:\WINDOWS\system32)
* Winrar


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


<i>No additional notes</i>
* [https://docs.microsoft.com/en-us/previous-versions//bb267310(v=vs.85)?redirectedfrom=MSDN CAB file format (microsoft.com)]
<br /><br />
* [https://en.wikipedia.org/wiki/Cabinet_(file_format) CAB description (wikipedia)]
[[Category:CE_None | Compression: None]]
<br/><br>
== Games ==


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


{{Format Navigation}}
[[Category:Complete Complete|CAB Archive]]
<br /><br />
[[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]]

Latest revision as of 11:39, 13 February 2022

Back to index | Edit this page

CAB

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


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

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

See Also