Difference between revisions of "JOEPack format"

From VDrift
Jump to: navigation, search
m (4 revisions: Import from old wiki (on 15 May 2012))
 
m (Formatting style updates)
Line 5: Line 5:
 
"JoePack" is a binary file format in which multi-byte values are expressed with the little-endian byte order. This section details version 1 of the file format.
 
"JoePack" is a binary file format in which multi-byte values are expressed with the little-endian byte order. This section details version 1 of the file format.
  
''Note: This documentation was generated by reverse engineering the source code.  So there may be errors in evaluation.''
+
{{note|This documentation was generated by reverse engineering the source code.  So there may be errors in evaluation.}}
=== Data Type Map ===
+
 
 +
===Data Type Map===
 
The following table explicitly defines the various data types used in a JOE file.
 
The following table explicitly defines the various data types used in a JOE file.
 
{| border="1"
 
{| border="1"
Line 18: Line 19:
 
|}
 
|}
  
=== File Header ===
+
===File Header===
 
This block of information initiates every file.
 
This block of information initiates every file.
  
{| border="1" width="100%"
+
{| border="1"
 
!Data type!!Block offset!!Name!!Description
 
!Data type!!Block offset!!Name!!Description
 
|-
 
|-
Line 34: Line 35:
 
|}
 
|}
  
=== File Allocation Table (FAT) ===
+
===File Allocation Table (FAT)===
 
The FAT consists of ''numobjs'' entries of the following format:
 
The FAT consists of ''numobjs'' entries of the following format:
{| border="1" width="100%"
+
{| border="1"
 
!Data type!!Block offset!!Name!!Description
 
!Data type!!Block offset!!Name!!Description
 
|-
 
|-
Line 49: Line 50:
 
|}
 
|}
  
=== File Data ===
+
===File Data===
 
Following the FAT, the JoePack file simply consists of all the data stored sequentially.  Seeking to the offset specified in the FAT (from the beginning of the file) will allow you to read that file's data like normal.
 
Following the FAT, the JoePack file simply consists of all the data stored sequentially.  Seeking to the offset specified in the FAT (from the beginning of the file) will allow you to read that file's data like normal.
  
 
[[Category:Files]]
 
[[Category:Files]]
 
[[Category:Review]]
 
[[Category:Review]]

Revision as of 05:49, 27 August 2012

This is a simple file format that just crams a bunch of files together, like a zip file, but without any compression.

Technical specification

"JoePack" is a binary file format in which multi-byte values are expressed with the little-endian byte order. This section details version 1 of the file format.

Note: This documentation was generated by reverse engineering the source code. So there may be errors in evaluation.

Data Type Map

The following table explicitly defines the various data types used in a JOE file.

Identifier Detailed Description
unsigned int 32-bit un-signed integer
unsigned short 16-bit un-signed integer
string[x] Array of characters with length x

File Header

This block of information initiates every file.

Data type Block offset Name Description
string[8] 0 versionstr Report the file version that this file conforms to. This specification details version 1 of the format.
unsigned int 8 numobjs This is the number of files contained in the pack
unsigned int 12 maxstrlen The maximum file name length in this pack

File Allocation Table (FAT)

The FAT consists of numobjs entries of the following format:

Data type Block offset Name Description
unsigned int 0 offset Offset into the file at which this file starts. This offset is in bytes from the beginning of the file.
unsigned int 4 length The length of the file this entry corresponds to.
string[maxstrlen] 8 filename The name of the file stored at this entry. Note that this is not necessarily null terminated - VDrift stores it in a string of length maxstrlen + 1 and pads it with a null character at the end

File Data

Following the FAT, the JoePack file simply consists of all the data stored sequentially. Seeking to the offset specified in the FAT (from the beginning of the file) will allow you to read that file's data like normal.