TAR Archive: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>WATTO
No edit summary
imported>Ikskoks
 
(19 intermediate revisions by 2 users not shown)
Line 3: Line 3:
* ''' Format Type ''':    Archive <br>  
* ''' Format Type ''':    Archive <br>  
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>  
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>  
* ''' Signature ''': ustar <br>




=== Format Specifications ===  
=== Format Specifications ===  


<tt><b>
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;">
<font color="blue"> ''' // For Each File ''' </font> <br>
<pre>
: char {100}&nbsp;&nbsp; - Filename <br>
// TAR archive
: char {8}&nbsp;&nbsp;&nbsp;&nbsp; - Mode <br>
 
: char {8}&nbsp;&nbsp;&nbsp;&nbsp; - UID <br>
 
: char {8}&nbsp;&nbsp;&nbsp;&nbsp; - GID <br>
number_of_files *
: char {12}&nbsp;&nbsp;&nbsp; - File Length <br>
{
: char {12}&nbsp;&nbsp;&nbsp; - Last Modification Time <br>
  // file header
: char {8}&nbsp;&nbsp;&nbsp;&nbsp; - Checksum <br>
  100 bytes (char) - file name + padding
: char {1}&nbsp;&nbsp;&nbsp;&nbsp; - Link Flag <br>
  8 bytes (char) - file mode  // e.g. "0100777."
: char {100}&nbsp;&nbsp; - Linked Filename <br>
  8 bytes (char) - Owner's ID (UID)  // e.g. "0000000."
: char {8}&nbsp;&nbsp;&nbsp;&nbsp; - Magic Number <br>
  8 bytes (char) - Group's ID (GID)  // e.g. "0000000."
: char {32}&nbsp;&nbsp;&nbsp; - uName <br>
  12 bytes (char) - file size in bytes  // e.g. "00000000011."
: char {32}&nbsp;&nbsp;&nbsp; - gName <br>
  12 bytes (char) - Last modification time
: char {8}&nbsp;&nbsp;&nbsp;&nbsp; - Major Version Number <br>
                    in Unix time format  // e.g. "14201537146."
: char {8}&nbsp;&nbsp;&nbsp;&nbsp; - Minor Version Number <br>
  8 bytes (char) - checksum for header record // e.g. "007212. "
: byte {167}&nbsp;&nbsp; - null Padding to make this file header have length 512 <br>
  1 byte (char) - file type  // "0" - normal file
: byte {X}&nbsp;&nbsp;&nbsp;&nbsp; - File Data <br>
                            // "1" - hard link
: byte {0-511} - null Padding to a multiple of 512 bytes <br>
                            // "2" - symbolic link
</b></tt>
                            // "3" - character special
                            // "4" - block special
                            // "5" - directory
                            // "6" - FIFO
                            // "7" - contiguous file
                            // "g" - global extended header
                            // "x" - extended header
                            // "A"-"Z" - vendor specific extensions
  100 bytes (char) - name of the linked file + padding  // can be empty
 
 
  // ustar header
  6 bytes (char) - signature  // "ustar."
  2 bytes (char) - ustar version  // "00"
  32 bytes (char) - owner user name  // can be empty
  32 bytes (char) - owner group name  // can be empty
  8 bytes (char) - device major number // can be empty
  8 bytes (char) - device minor number // can be empty
  167 bytes (char) - padding 
 
 
  // data
  x bytes - file data
  x bytes - padding
}
</pre>
</div>


=== MultiEx BMS ===  
=== MultiEx BMS ===  


Not written yet<br><br>
Not written yet.


=== Notes and Comments ===  
=== Notes and Comments ===  
Line 42: Line 69:


* [[Game Extractor|Game Extractor]]<br>
* [[Game Extractor|Game Extractor]]<br>
* Many standard file compressors/decompressors (e.g. Winrar)
=== See Also ===
* [https://en.wikipedia.org/wiki/Tar_(computing) TAR description (wikipedia)]
<br><br><br>
[[Category:Complete Complete|TAR Archive]]
[[Category:Platform PC|TAR Archive]]
[[Category:CE Compressed|TAR Archive]]
[[Category:Format_Archive | Type: Archive]]
[[Category:Extension_tar | Extension: tar]]
[[Category:BMS_None | BMS: None]]
[[Category:File Format]]

Latest revision as of 12:45, 12 February 2022

TAR

  • Format Type : Archive
  • Endian Order : Little Endian
  • Signature : ustar


Format Specifications

// TAR archive


number_of_files *
{
  // file header
  100 bytes (char) - file name + padding
  8 bytes (char) - file mode  // e.g. "0100777."
  8 bytes (char) - Owner's ID (UID)  // e.g. "0000000."
  8 bytes (char) - Group's ID (GID)  // e.g. "0000000."
  12 bytes (char) - file size in bytes  // e.g. "00000000011."
  12 bytes (char) - Last modification time 
                    in Unix time format  // e.g. "14201537146."
  8 bytes (char) - checksum for header record // e.g. "007212. "
  1 byte (char) - file type  // "0" - normal file
                             // "1" - hard link
                             // "2" - symbolic link
                             // "3" - character special
                             // "4" - block special
                             // "5" - directory
                             // "6" - FIFO
                             // "7" - contiguous file 
                             // "g" - global extended header
                             // "x" - extended header
                             // "A"-"Z" - vendor specific extensions
  100 bytes (char) - name of the linked file + padding  // can be empty


  // ustar header
  6 bytes (char) - signature  // "ustar."
  2 bytes (char) - ustar version  // "00"
  32 bytes (char) - owner user name  // can be empty
  32 bytes (char) - owner group name  // can be empty
  8 bytes (char) - device major number // can be empty
  8 bytes (char) - device minor number // can be empty
  167 bytes (char) - padding  


  // data
  x bytes - file data
  x bytes - padding
}

MultiEx BMS

Not written yet.

Notes and Comments

  • Generic TAR archive
  • All fields are null-terminated strings
  • The fields are also padded to the right, meaning that there is padding of (byte)32 at the start of each field, so that the entire contents of that field are as far to the right as possible for that field length
  • Fields that contain a number (such as the File Length) are Octal numbers (base 8)

Supported Programs

  • Game Extractor
  • Many standard file compressors/decompressors (e.g. Winrar)

See Also