Difference between revisions of "DGTEFF"

From XentaxWiki
Jump to: navigation, search
m
m (Protected "DGTEFF": semiprotection should be ideal ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
 
(10 intermediate revisions by 3 users not shown)
Line 22: Line 22:
 
----
 
----
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "center" bgcolor = "#E0E0E0"|<font size = "5">'''''THE DEFINITIVE GUIDE TO'''''</font>
+
|align="center" bgcolor="#E0E0E0"|<font size="5">'''''THE DEFINITIVE GUIDE TO'''''</font>
 
|-
 
|-
|align = "center" bgcolor = "#E0E0E0"|<font size = "5">'''''EXPLORING FILE FORMATS'''''</font>
+
|align="center" bgcolor="#E0E0E0"|<font size="5">'''''EXPLORING FILE FORMATS'''''</font>
 
|-
 
|-
|align = "center" bgcolor = "#E0E0E0"|&nbsp;
+
|align="center" bgcolor="#E0E0E0"|&nbsp;
 
|-
 
|-
 
|}
 
|}
  
<font size = "3">'''''= Revision 2 ='''''</font>
+
<font size="3">'''''= Revision 2 ='''''</font>
  
<font size = "3">'''WATTO'''</font>
+
<font size="3">'''WATTO'''</font>
  
<font size = "3">'''(www.watto.org)'''</font>
+
<font size="3">'''(www.watto.org)'''</font>
  
<font size = "3">'''Mike Zuurman'''</font>
+
<font size="3">'''Mike Zuurman'''</font>
  
<font size = "3">'''(www.xentax.com)'''</font>
+
<font size="3">'''(www.xentax.com)'''</font>
  
 
==Table of Contents==
 
==Table of Contents==
Line 48: Line 48:
 
Computer games are vast and many, covering a wide range of genres and game styles, but there is one fundamental feature that all games require - resources. Every game has a range of resources that help make it unique - from texture images to audio soundtracks. With all these resources, there needs to be a way they can be stored so that games can use them, and the way this is typically done is to store them in a big <font color="#008000">''archive''</font> file.
 
Computer games are vast and many, covering a wide range of genres and game styles, but there is one fundamental feature that all games require - resources. Every game has a range of resources that help make it unique - from texture images to audio soundtracks. With all these resources, there needs to be a way they can be stored so that games can use them, and the way this is typically done is to store them in a big <font color="#008000">''archive''</font> file.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|An <font color="#008000">''archive''</font> is a single computer file that contains the data for several smaller files. A common analogy would be a cardboard box - it can be used to store a lot of different items (paper, food, objects), and each item can have different properties (size, color, shape)
+
|align="justify" bgcolor="#E6E6E6"|An <font color="#008000">''archive''</font> is a single computer file that contains the data for several smaller files. A common analogy would be a cardboard box - it can be used to store a lot of different items (paper, food, objects), and each item can have different properties (size, color, shape)
 
|-
 
|-
 
|}
 
|}
  
The question that may arise is "why do game developers use archives to store their game resources? Wouldn<nowiki>’</nowiki>t it be easier to just store all the files normally?" The answer is yes, storing the files normally would be much easier, and certainly much better during the game development, but before the final production they are packaged into archives for several reasons…
+
The question that may arise is "why do game developers use archives to store their game resources? Wouldn’t it be easier to just store all the files normally?" The answer is yes, storing the files normally would be much easier, and certainly much better during the game development, but before the final production they are packaged into archives for several reasons…
  
 
* An archive can store a lot of files in a single location, so it is quicker to access the files from a hard disk or CD
 
* An archive can store a lot of files in a single location, so it is quicker to access the files from a hard disk or CD
Line 68: Line 68:
 
Some of the more modern games produced these days recognise that they can gain extra advertising by allowing the internet community to <font color="#008000">''mod</font> ''their games. Due to this, some game developers have changed to supporting standard archive types, such as Zip archives, however there is still an overwhelming number of games with their own proprietary archive formats.
 
Some of the more modern games produced these days recognise that they can gain extra advertising by allowing the internet community to <font color="#008000">''mod</font> ''their games. Due to this, some game developers have changed to supporting standard archive types, such as Zip archives, however there is still an overwhelming number of games with their own proprietary archive formats.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|<font color="#008000">Mod</font>, short for modification, refers to the alteration of a computer game by a member of the internet community, usually to support extra functionality or to generate a different game built on top of the original. Some examples include changing the sounds and textures used by a game, or creating new game maps.
+
|align="justify" bgcolor="#E6E6E6"|<font color="#008000">Mod</font>, short for modification, refers to the alteration of a computer game by a member of the internet community, usually to support extra functionality or to generate a different game built on top of the original. Some examples include changing the sounds and textures used by a game, or creating new game maps.
 
|-
 
|-
 
|}
 
|}
Line 80: Line 80:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify"|<font color="#0000FF"><u>Link</u></font>
+
|align="justify"|<font color="#0000FF"><u>Link</u></font>
|align = "justify"|A link to a website of interest or for further information.
+
|align="justify"|A link to a website of interest or for further information.
 
|-
 
|-
|align = "justify"|<font color="#800080"><u>Link</u></font>
+
|align="justify"|<font color="#800080"><u>Link</u></font>
|align = "justify"|A link to a different section of the document.
+
|align="justify"|A link to a different section of the document.
 
|-
 
|-
|align = "justify"|<font color="#008000">''Term''</font>
+
|align="justify"|<font color="#008000">''Term''</font>
|align = "justify"|An important term, or a term that is being defined.<br>A general comment, or clarification of a point.
+
|align="justify"|An important term, or a term that is being defined.<br>A general comment, or clarification of a point.
 
|-
 
|-
|align = "justify"|<font color="#800000">Value</font>
+
|align="justify"|<font color="#800000">Value</font>
|align = "justify"|A value, usually in an example
+
|align="justify"|A value, usually in an example
 
|-
 
|-
|align = "justify"|<font color="#000080">Caption</font>
+
|align="justify"|<font color="#000080">Caption</font>
|align = "justify"|Caption for an image, or a reference to some information in the image
+
|align="justify"|Caption for an image, or a reference to some information in the image
 
|-
 
|-
|align = "justify"|<font color="#FF6600">Reference</font>
+
|align="justify"|<font color="#FF6600">Reference</font>
|align = "justify"|A tool reference, such as a menu, button, or action in a specific program.
+
|align="justify"|A tool reference, such as a menu, button, or action in a specific program.
 
|-
 
|-
 
|}
 
|}
  
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|Brief descriptions of a term, related notes, or other supplementary material will be presented in a box like this. This will often accompany a <font color="#008000">''term''</font>.
+
|align="justify" bgcolor="#E6E6E6"|Brief descriptions of a term, related notes, or other supplementary material will be presented in a box like this. This will often accompany a <font color="#008000">''term''</font>.
 
|-
 
|-
 
|}
 
|}
Line 108: Line 108:
  
 
{|border="0" cellspacing="2" width="100%"
 
{|border="0" cellspacing="2" width="100%"
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
 
|-
 
|-
 
|}
 
|}
Line 117: Line 117:
 
The term <font color="#008000">''GRAF''</font> describes the way a game archive is constructed, and in particular, the storage of the files within the archive. The format of an archive usually differs between each individual game, however occasionally a game developer will stick with a particular format for a few games of the same vintage, particularly if the games are built using the same underlying game engine.
 
The term <font color="#008000">''GRAF''</font> describes the way a game archive is constructed, and in particular, the storage of the files within the archive. The format of an archive usually differs between each individual game, however occasionally a game developer will stick with a particular format for a few games of the same vintage, particularly if the games are built using the same underlying game engine.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|<font color="#008000">GRAF</font> stands for <font color="#008000">Game Resource Archive Format</font>, which is most simply the specifications describing the format of a particular archive.
+
|align="justify" bgcolor="#E6E6E6"|<font color="#008000">GRAF</font> stands for <font color="#008000">Game Resource Archive Format</font>, which is most simply the specifications describing the format of a particular archive.
 
|-
 
|-
 
|}
 
|}
Line 126: Line 126:
 
The development of a GRAF is particularly troublesome - there is a constant weigh-up between factors such as <font color="#008000">''efficient storage''</font>, <font color="#008000">''quick loading''</font>, and <font color="#008000">''fast targeting''</font>. One of the things that has great influence is human readability - the things that make archives easy for humans to use, often make it less efficient. For example, the storing of filenames in an archive tells humans the purpose and type of data, however it is very inefficient and slow to read filenames from an archive - thus the weigh-up.
 
The development of a GRAF is particularly troublesome - there is a constant weigh-up between factors such as <font color="#008000">''efficient storage''</font>, <font color="#008000">''quick loading''</font>, and <font color="#008000">''fast targeting''</font>. One of the things that has great influence is human readability - the things that make archives easy for humans to use, often make it less efficient. For example, the storing of filenames in an archive tells humans the purpose and type of data, however it is very inefficient and slow to read filenames from an archive - thus the weigh-up.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|<font color="#008000">Efficient storage</font>: Files need to be stored in a way that conserves space on the disk and/or in memory.
+
|align="justify" bgcolor="#E6E6E6"|<font color="#008000">Efficient storage</font>: Files need to be stored in a way that conserves space on the disk and/or in memory.
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|&nbsp;
+
|align="justify" bgcolor="#E6E6E6"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|<font color="#008000">Quick Loading</font>: When the game is loading, the required resources are loaded into memory - this needs to be done quickly, while still gathering all the required information.
+
|align="justify" bgcolor="#E6E6E6"|<font color="#008000">Quick Loading</font>: When the game is loading, the required resources are loaded into memory - this needs to be done quickly, while still gathering all the required information.
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|&nbsp;
+
|align="justify" bgcolor="#E6E6E6"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|<font color="#008000">Fast Targeting</font>: When a resource is loaded into memory, it needs to be quick and easy for the game to find the file. This is usually a big weigh-up between human readability (filenames) vs. computer efficiency (hash fields and trees).
+
|align="justify" bgcolor="#E6E6E6"|<font color="#008000">Fast Targeting</font>: When a resource is loaded into memory, it needs to be quick and easy for the game to find the file. This is usually a big weigh-up between human readability (filenames) vs. computer efficiency (hash fields and trees).
 
|-
 
|-
 
|}
 
|}
Line 145: Line 145:
 
The generic hex editor is the main type of program used to view data in non-text files, such as archives. Similarly to the way word processors display text data, a hex editor displays the contents of a file using <font color="#008000">''hex''</font> characters.
 
The generic hex editor is the main type of program used to view data in non-text files, such as archives. Similarly to the way word processors display text data, a hex editor displays the contents of a file using <font color="#008000">''hex''</font> characters.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|<font color="#008000">Hex</font> characters are an alternate way to represent the byte data in a file. Whereas word processors display byte values as letters, hex displays each byte as a 2-character code that represents all possible values 0-256 (00-FF). The way to read and construct hex values is discussed in a later chapter
+
|align="justify" bgcolor="#E6E6E6"|<font color="#008000">Hex</font> characters are an alternate way to represent the byte data in a file. Whereas word processors display byte values as letters, hex displays each byte as a 2-character code that represents all possible values 0-256 (00-FF). The way to read and construct hex values is discussed in a later chapter
 
|-
 
|-
 
|}
 
|}
Line 161: Line 161:
 
* Colour mapping.
 
* Colour mapping.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|<font color="#FF6600">Hex Workshop</font> is available from <font color="#0000FF"><u>http://www.bpsoft.com</u></font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#FF6600">Hex Workshop</font> is available from <font color="#0000FF"><u>http://www.bpsoft.com</u></font>
 
|-
 
|-
 
|}
 
|}
Line 171: Line 171:
 
Here we present a brief introduction into the use of <font color="#FF6600">''Hex Workshop''</font>. Although this is the main program that will be used for the screenshots in this book, take note that almost everything in this program can be applied to other hex editors, including the interface structure and layout.
 
Here we present a brief introduction into the use of <font color="#FF6600">''Hex Workshop''</font>. Although this is the main program that will be used for the screenshots in this book, take note that almost everything in this program can be applied to other hex editors, including the interface structure and layout.
  
n[[Image:## Error Converting ##]]
+
n[[File:## Error Converting ##]]
[[Image:Guide_To_Exploring_File_Formats_-_011_-_01.png]]
+
[[File:Guide_To_Exploring_File_Formats_-_011_-_01.png]]
 
<font color="#000080">'''Figure 3.1.1a: General layout of Hex Workshop'''</font>
 
<font color="#000080">'''Figure 3.1.1a: General layout of Hex Workshop'''</font>
  
Line 185: Line 185:
 
When you have installed Hex Workshop, a convenience link is added to the ''context menu'' of Windows Explorer. Just right-click on a file and select "Edit with Hex Workshop" to open the file in the program
 
When you have installed Hex Workshop, a convenience link is added to the ''context menu'' of Windows Explorer. Just right-click on a file and select "Edit with Hex Workshop" to open the file in the program
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|The context menu is the menu that appears when you right-click in a Windows program. Named due to the fact that the links in the menu depend on the context of the right-click. For example, right-clicking on a file will give different choices to right-clicking on a selected piece of text.
+
|align="justify" bgcolor="#E6E6E6"|The context menu is the menu that appears when you right-click in a Windows program. Named due to the fact that the links in the menu depend on the context of the right-click. For example, right-clicking on a file will give different choices to right-clicking on a selected piece of text.
 
|-
 
|-
 
|}
 
|}
Line 192: Line 192:
 
Once you have opened a file, you will be presented with a view similar to that depicted in '''Figure 3.1.1a'''. You can examine the files hexadecimal interpretation in section '''A''', or the ASCII interpretation of the same bytes in section '''B'''. The table to the far left shows the ''offset ''of the lines shown.
 
Once you have opened a file, you will be presented with a view similar to that depicted in '''Figure 3.1.1a'''. You can examine the files hexadecimal interpretation in section '''A''', or the ASCII interpretation of the same bytes in section '''B'''. The table to the far left shows the ''offset ''of the lines shown.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|An offset is the location of the file data in relation to the start of the file. For example, an offset of value 560 means there are 560 bytes of data before you reach the current location.
+
|align="justify" bgcolor="#E6E6E6"|An offset is the location of the file data in relation to the start of the file. For example, an offset of value 560 means there are 560 bytes of data before you reach the current location.
 
|-
 
|-
 
|}
 
|}
Line 199: Line 199:
 
In this example, we have opened one of the <nowiki>*</nowiki>.pk4 files from the game Doom 3. We will later see that these are actually generic <nowiki>*</nowiki>.zip files. For now, you can see the file starts with the characters PK. The characters at the beginning of a file are often referred to as a ''header'', ''ID tag'', or ''magic number'' - and are usually a reliable way to identify whether the file is a common type. For example, all <nowiki>*</nowiki>.zip archives have the characters PK at the beginning, therefore there is a strong probability that the archive in our example is a <nowiki>*</nowiki>.zip archive. A brief list of some common ''header tags'' can be found later in the book.
 
In this example, we have opened one of the <nowiki>*</nowiki>.pk4 files from the game Doom 3. We will later see that these are actually generic <nowiki>*</nowiki>.zip files. For now, you can see the file starts with the characters PK. The characters at the beginning of a file are often referred to as a ''header'', ''ID tag'', or ''magic number'' - and are usually a reliable way to identify whether the file is a common type. For example, all <nowiki>*</nowiki>.zip archives have the characters PK at the beginning, therefore there is a strong probability that the archive in our example is a <nowiki>*</nowiki>.zip archive. A brief list of some common ''header tags'' can be found later in the book.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|A ''header tag'' is simply a small group of bytes at the start of a file that help to identify the format of the remaining data. The header tag is usually a 4-byte string, however it can also be a preset set of byte values. While it is true that a files<nowiki>’</nowiki> extension can help determine a file format, it is often unreliable and can be easily changed, whereas a header tag is hard to alter and is usually unique. In reality, the best way to determine a files format is to use a combination of the file extension and the header tag.
+
|align="justify" bgcolor="#E6E6E6"|A ''header tag'' is simply a small group of bytes at the start of a file that help to identify the format of the remaining data. The header tag is usually a 4-byte string, however it can also be a preset set of byte values. While it is true that a file’s extension can help determine a file format, it is often unreliable and can be easily changed, whereas a header tag is hard to alter and is usually unique. In reality, the best way to determine a files format is to use a combination of the file extension and the header tag.
 
|-
 
|-
 
|}
 
|}
Line 208: Line 208:
 
In our example image, we have ''color mapped'' and ''bookmarked'' (as in section '''D''') some areas of our interest. Any range of bytes can be bookmarked or color mapped - simply click and drag the cursor along your area of interest and select the appropriate option from the context menu. When you make a bookmark, you can choose the data interpretation of the selection (its ''value''), and give a ''description''. The bookmarks will be shown with their ''offset ''in the file and the ''length'' in bytes. This is a very useful feature, as it allows you to click on a bookmark to jump to that offset.
 
In our example image, we have ''color mapped'' and ''bookmarked'' (as in section '''D''') some areas of our interest. Any range of bytes can be bookmarked or color mapped - simply click and drag the cursor along your area of interest and select the appropriate option from the context menu. When you make a bookmark, you can choose the data interpretation of the selection (its ''value''), and give a ''description''. The bookmarks will be shown with their ''offset ''in the file and the ''length'' in bytes. This is a very useful feature, as it allows you to click on a bookmark to jump to that offset.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|Color mapping: assigns a color to the selected area, to make it stand out.
+
|align="justify" bgcolor="#E6E6E6"|Color mapping: assigns a color to the selected area, to make it stand out.
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|&nbsp;
+
|align="justify" bgcolor="#E6E6E6"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|Bookmarking: records the current cursor location in section D, with a user-defined description.
+
|align="justify" bgcolor="#E6E6E6"|Bookmarking: records the current cursor location in section D, with a user-defined description.
 
|-
 
|-
 
|}
 
|}
Line 227: Line 227:
 
A computer <font color="#008000">''file''</font> is a series of bytes stored one after the other which, when combined together, form a representation of a piece of data. If you have a file that is 12 bytes in size, it indicates that there are 12 single bytes of data that are used to represent the entire document.
 
A computer <font color="#008000">''file''</font> is a series of bytes stored one after the other which, when combined together, form a representation of a piece of data. If you have a file that is 12 bytes in size, it indicates that there are 12 single bytes of data that are used to represent the entire document.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|The term <font color="#008000">File</font> stems from the original computer metaphor as an office replacement. As in a work office, <font color="#008000">files</font> were organised into <font color="#008000">folders</font>, where each folder contained a group of related files.
+
|align="justify" bgcolor="#E6E6E6"|The term <font color="#008000">File</font> stems from the original computer metaphor as an office replacement. As in a work office, <font color="#008000">files</font> were organised into <font color="#008000">folders</font>, where each folder contained a group of related files.
 
|-
 
|-
 
|}
 
|}
Line 235: Line 235:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="88%"
 
{|border="2" cellspacing="0" cellpadding="4" width="88%"
|align = "center" bgcolor = "#E6E6E6"|<font color="#000080">Byte</font> <font color="#008000">(B)</font>
+
|align="center" bgcolor="#E6E6E6"|<font color="#000080">Byte</font> <font color="#008000">(B)</font>
|align = "center"|<br>
+
|align="center"|<br>
|align = "center"|&nbsp;
+
|align="center"|&nbsp;
|align = "center"|&nbsp;
+
|align="center"|&nbsp;
|align = "center"|&nbsp;
+
|align="center"|&nbsp;
 
|-
 
|-
|align = "center" bgcolor = "#E6E6E6"|<font color="#000080">Kilobyte</font> <font color="#008000">(KB)</font>
+
|align="center" bgcolor="#E6E6E6"|<font color="#000080">Kilobyte</font> <font color="#008000">(KB)</font>
|align = "center"|1,024<br><font size = "1">(1 thousand bytes)</font>
+
|align="center"|1,024<br><font size="1">(1 thousand bytes)</font>
|align = "center"|&nbsp;
+
|align="center"|&nbsp;
|align = "center"|&nbsp;
+
|align="center"|&nbsp;
|align = "center"|&nbsp;
+
|align="center"|&nbsp;
 
|-
 
|-
|align = "center" bgcolor = "#E6E6E6"|<font color="#000080">Megabyte </font><font color="#008000">(MB)</font>
+
|align="center" bgcolor="#E6E6E6"|<font color="#000080">Megabyte </font><font color="#008000">(MB)</font>
|align = "center"|1,048,576<br><font size = "1">(1 million bytes)</font>
+
|align="center"|1,048,576<br><font size="1">(1 million bytes)</font>
|align = "center"|1,024<br><font size = "1">(1 thousand KB)</font>
+
|align="center"|1,024<br><font size="1">(1 thousand KB)</font>
|align = "center"|&nbsp;
+
|align="center"|&nbsp;
|align = "center"|&nbsp;
+
|align="center"|&nbsp;
 
|-
 
|-
|align = "center" bgcolor = "#E6E6E6"|<font color="#000080">Gigabyte</font> <font color="#008000">(GB)</font>
+
|align="center" bgcolor="#E6E6E6"|<font color="#000080">Gigabyte</font> <font color="#008000">(GB)</font>
|align = "center"|1,073,741,824<br><font size = "1">(1 billion bytes)</font>
+
|align="center"|1,073,741,824<br><font size="1">(1 billion bytes)</font>
|align = "center"|1,048,576<br><font size = "1">(1 million KB)</font>
+
|align="center"|1,048,576<br><font size="1">(1 million KB)</font>
|align = "center"|1,024<br><font size = "1">(1 thousand MB)</font>
+
|align="center"|1,024<br><font size="1">(1 thousand MB)</font>
|align = "center"|&nbsp;
+
|align="center"|&nbsp;
 
|-
 
|-
|align = "center" bgcolor = "#E6E6E6"|<font color="#000080">Terabyte</font> <font color="#008000">(TB)</font>
+
|align="center" bgcolor="#E6E6E6"|<font color="#000080">Terabyte</font> <font color="#008000">(TB)</font>
|align = "center"|1,099,511,627,776<br><font size = "1">(1 trillion bytes)</font>
+
|align="center"|1,099,511,627,776<br><font size="1">(1 trillion bytes)</font>
|align = "center"|1,073,741,824<br><font size = "1">(1 billion KB)</font>
+
|align="center"|1,073,741,824<br><font size="1">(1 billion KB)</font>
|align = "center"|1,048,576<br><font size = "1">(1 million MB)</font>
+
|align="center"|1,048,576<br><font size="1">(1 million MB)</font>
|align = "center"|1,024<br><font size = "1">(1 thousand GB)</font>
+
|align="center"|1,024<br><font size="1">(1 thousand GB)</font>
 
|-
 
|-
 
|}
 
|}
  
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|In actual fact, computer data is stored using <font color="#008000">bits</font>, not bytes. A bit is the smallest unit that a computer can deal with, however all modern file systems treat a byte as being the smallest unit as a byte is capable of storing relatively useful information. It is impossible to store a single bit in a modern file system - the best that can be done is to store a single byte that has the same value as the bit.
+
|align="justify" bgcolor="#E6E6E6"|In actual fact, computer data is stored using <font color="#008000">bits</font>, not bytes. A bit is the smallest unit that a computer can deal with, however all modern file systems treat a byte as being the smallest unit as a byte is capable of storing relatively useful information. It is impossible to store a single bit in a modern file system - the best that can be done is to store a single byte that has the same value as the bit.
 
|-
 
|-
 
|}
 
|}
  
 
===Bits===
 
===Bits===
When we talk about the basic structure of a file, we typically think in terms of bytes. However, at its absolute simplest, the actual underlying file structure is a sequence of bits or binary values. We don<nowiki>’</nowiki>t usually deal with this level of representation because binary values don<nowiki>’</nowiki>t have the ability to represent anything meaningful. However, when grouped into sets of 8 bits, the range of information that can be stored becomes satisfactory.
+
When we talk about the basic structure of a file, we typically think in terms of bytes. However, at its absolute simplest, the actual underlying file structure is a sequence of bits or binary values. We don’t usually deal with this level of representation because binary values don’t have the ability to represent anything meaningful. However, when grouped into sets of 8 bits, the range of information that can be stored becomes satisfactory.
  
A bit, or binary value, is the language of a computer, and thus the underlying structure of everything readable by a computer. A bit only has 2 possible values – <font color="#800000">1</font> or <font color="#800000">0</font> – thus it is obvious why they are limited in what they represent.
+
A bit, or binary value, is the language of a computer, and thus the underlying structure of everything readable by a computer. A bit only has 2 possible values <font color="#800000">1</font> or <font color="#800000">0</font> thus it is obvious why they are limited in what they represent.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|The 2 possible values of a bit, <font color="#800000">0</font> and <font color="#800000">1</font>, are also commonly referred to as being either <font color="#008000">false</font> or <font color="#008000">true</font> (respectively). It can therefore be said that a bit is either a <font color="#008000">true-bit</font> or a <font color="#008000">false-bit</font>.
+
|align="justify" bgcolor="#E6E6E6"|The 2 possible values of a bit, <font color="#800000">0</font> and <font color="#800000">1</font>, are also commonly referred to as being either <font color="#008000">false</font> or <font color="#008000">true</font> (respectively). It can therefore be said that a bit is either a <font color="#008000">true-bit</font> or a <font color="#008000">false-bit</font>.
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|&nbsp;
+
|align="justify" bgcolor="#E6E6E6"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|Sometimes, although less common, a bit with value <font color="#800000">0</font> is referred to as being <font color="#008000">disabled</font>, and value <font color="#800000">1</font> is <font color="#008000">enabled</font>. This can sometimes help in user understanding, depending on the context of the discussion.
+
|align="justify" bgcolor="#E6E6E6"|Sometimes, although less common, a bit with value <font color="#800000">0</font> is referred to as being <font color="#008000">disabled</font>, and value <font color="#800000">1</font> is <font color="#008000">enabled</font>. This can sometimes help in user understanding, depending on the context of the discussion.
 
|-
 
|-
 
|}
 
|}
Line 291: Line 291:
 
So how do the grouped bits represent a larger numerical value such as that of a byte? This is achieved quite easily by referring to each of the 8 bits as an increasing power of 2.
 
So how do the grouped bits represent a larger numerical value such as that of a byte? This is achieved quite easily by referring to each of the 8 bits as an increasing power of 2.
  
If we take a look at a single bit, we can think of it as having either the value <font color="#800000">1</font>x2<sup>0</sup> or <font color="#800000">0</font>x2<sup>0</sup> – thus giving us the values 1 or 0 respectively. If we add a bit to the left, the power of the new bit is either<font color="#800000"> 1</font>x2<sup>1</sup> or <font color="#800000">0</font>x2<sup>1</sup> – either 2 or 0. By adding the values of these 2 bits together, you should be able to see that all possible combinations will give us the values 0, 1, 2, and 3, as shown in the table below:
+
If we take a look at a single bit, we can think of it as having either the value <font color="#800000">1</font>x2<sup>0</sup> or <font color="#800000">0</font>x2<sup>0</sup> thus giving us the values 1 or 0 respectively. If we add a bit to the left, the power of the new bit is either<font color="#800000"> 1</font>x2<sup>1</sup> or <font color="#800000">0</font>x2<sup>1</sup> either 2 or 0. By adding the values of these 2 bits together, you should be able to see that all possible combinations will give us the values 0, 1, 2, and 3, as shown in the table below:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="92%"
 
{|border="2" cellspacing="0" cellpadding="4" width="92%"
|align = "center" bgcolor = "#E6E6E6"|<font color="#000080">Bit 1 (2<sup>1</sup>)</font>
+
|align="center" bgcolor="#E6E6E6"|<font color="#000080">Bit 1 (2<sup>1</sup>)</font>
|align = "center" bgcolor = "#E6E6E6"|<font color="#000080">Bit 0 (2<sup>0</sup>)</font>
+
|align="center" bgcolor="#E6E6E6"|<font color="#000080">Bit 0 (2<sup>0</sup>)</font>
|align = "center" bgcolor = "#E6E6E6"|<font color="#000080">Value</font>
+
|align="center" bgcolor="#E6E6E6"|<font color="#000080">Value</font>
 
|-
 
|-
|align = "center"|0
+
|align="center"|0
|align = "center"|0
+
|align="center"|0
|align = "center"|0 (<font color="#800000">0</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>0</sup>)
+
|align="center"|0 (<font color="#800000">0</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>0</sup>)
 
|-
 
|-
|align = "center"|0
+
|align="center"|0
|align = "center"|1
+
|align="center"|1
|align = "center"|1 (<font color="#800000">0</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>0</sup>)
+
|align="center"|1 (<font color="#800000">0</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>0</sup>)
 
|-
 
|-
|align = "center"|1
+
|align="center"|1
|align = "center"|0
+
|align="center"|0
|align = "center"|2 (<font color="#800000">1</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>0</sup>)
+
|align="center"|2 (<font color="#800000">1</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>0</sup>)
 
|-
 
|-
|align = "center"|1
+
|align="center"|1
|align = "center"|1
+
|align="center"|1
|align = "center"|3 (<font color="#800000">1</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>0</sup>)
+
|align="center"|3 (<font color="#800000">1</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>0</sup>)
 
|-
 
|-
 
|}
 
|}
  
If we continue this pattern for the remaining 6 bits, our highest bit will provide the power 2<sup>7</sup>. If all our 8 bits are <font color="#008000">''enabled''</font>, we would end up with the number 255 (<font color="#800000">1</font>x2<sup>7</sup> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>6</sup> <nowiki>+</nowiki> … <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>0</sup>). <font color="#800080"><u>Appendix 1</u></font> provides a list of all possible byte values, and their bit value.
+
If we continue this pattern for the remaining 6 bits, our highest bit will provide the power 2<sup>7</sup>. If all our 8 bits are <font color="#008000">''enabled''</font>, we would end up with the number 255 (<font color="#800000">1</font>x2<sup>7</sup> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>6</sup> <nowiki>+</nowiki> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>0</sup>). <font color="#800080"><u>Appendix 1</u></font> provides a list of all possible byte values, and their bit value.
  
 
===Bytes===
 
===Bytes===
Line 330: Line 330:
 
A 16-bit value is commonly known in <font color="#008000">''older programming languages''</font> as a word or an Integer. <font color="#008000">''Newer programming languages''</font> call it a Short.
 
A 16-bit value is commonly known in <font color="#008000">''older programming languages''</font> as a word or an Integer. <font color="#008000">''Newer programming languages''</font> call it a Short.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|The term <font color="#008000">older programming languages</font> refers to the language <font color="#FF6600">C<nowiki>++</nowiki></font>, and any language that was derived before this time, such as <font color="#FF6600">C</font>, <font color="#FF6600">Visual Basic</font> (1.0 - 6.0), <font color="#FF6600">ASP</font>, <font color="#FF6600">Perl</font>, <font color="#FF6600">Pascal</font>, etc.
+
|align="justify" bgcolor="#E6E6E6"|The term <font color="#008000">older programming languages</font> refers to the language <font color="#FF6600">C<nowiki>++</nowiki></font>, and any language that was derived before this time, such as <font color="#FF6600">C</font>, <font color="#FF6600">Visual Basic</font> (1.0 - 6.0), <font color="#FF6600">ASP</font>, <font color="#FF6600">Perl</font>, <font color="#FF6600">Pascal</font>, etc.
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|&nbsp;
+
|align="justify" bgcolor="#E6E6E6"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|The term <font color="#008000">newer programming languages</font> refers to languages derived after C<nowiki>++</nowiki>, such as <font color="#FF6600">Java</font>, <font color="#FF6600">Python</font>, <font color="#FF6600">Delphi</font>, and the <font color="#FF6600">.Net</font> languages (<font color="#FF6600">C<nowiki> </nowiki></font>, <font color="#FF6600">VB.net</font>, <font color="#FF6600">ASP.net</font>, <font color="#FF6600">J<nowiki> </nowiki></font>)
+
|align="justify" bgcolor="#E6E6E6"|The term <font color="#008000">newer programming languages</font> refers to languages derived after C<nowiki>++</nowiki>, such as <font color="#FF6600">Java</font>, <font color="#FF6600">Python</font>, <font color="#FF6600">Delphi</font>, and the <font color="#FF6600">.Net</font> languages (<font color="#FF6600">C<nowiki> </nowiki></font>, <font color="#FF6600">VB.net</font>, <font color="#FF6600">ASP.net</font>, <font color="#FF6600">J<nowiki> </nowiki></font>)
 
|-
 
|-
 
|}
 
|}
Line 341: Line 341:
 
A 16-bit number is just as the name suggests, a number created by 16 bits in a row. To determine the value of the 16-bit number, we follow the same process as when we wanted to get the value of a byte.
 
A 16-bit number is just as the name suggests, a number created by 16 bits in a row. To determine the value of the 16-bit number, we follow the same process as when we wanted to get the value of a byte.
  
Each of the 16 bits that make up the 16-bit number represents a power of 2 – the leftmost bit represents 2<sup>15</sup> and the rightmost bit 2<sup>0</sup>. Just as with bytes, we just go through each bit and calculate the <font color="#800000">''bitvalue''</font> x <font color="#800000">''power''</font>.
+
Each of the 16 bits that make up the 16-bit number represents a power of 2 the leftmost bit represents 2<sup>15</sup> and the rightmost bit 2<sup>0</sup>. Just as with bytes, we just go through each bit and calculate the <font color="#800000">''bitvalue''</font> x <font color="#800000">''power''</font>.
  
An example – lets say we have the following 16 bits…
+
An example lets say we have the following 16 bits…
  
 
101111000001100
 
101111000001100
  
Working from left to right, we get the value…
+
Working from left to right, we get the value…
  
<font color="#800000">1</font>x2<sup>15 </sup><nowiki>+</nowiki><font color="#800000"> 0</font>x2<sup>14 </sup><nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>13 </sup><nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>12 </sup><nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>11 </sup><nowiki>+</nowiki> … <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>2</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>1 </sup><nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>0</sup>
+
<font color="#800000">1</font>x2<sup>15 </sup><nowiki>+</nowiki><font color="#800000"> 0</font>x2<sup>14 </sup><nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>13 </sup><nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>12 </sup><nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>11 </sup><nowiki>+</nowiki> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>2</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>1 </sup><nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>0</sup>
  
 
If you work this out, you should end up with the number 24076.
 
If you work this out, you should end up with the number 24076.
  
If all 16 bits had the value 1, you would end up with the number 65535 – therefore the value of a 16-bit number ranges between 0 and 65535.
+
If all 16 bits had the value 1, you would end up with the number 65535 therefore the value of a 16-bit number ranges between 0 and 65535.
  
 
===-bit (4-byte) numbers===
 
===-bit (4-byte) numbers===
 
A 32-bit number follows the same principles as a 16-bit number, with the exception that there are now 32 bits that represent the value. Therefore, the <font color="#008000">''highest''</font> bit has a value 2<sup>31</sup> and the <font color="#008000">''lowest''</font> bit has value 2<sup>0</sup>.
 
A 32-bit number follows the same principles as a 16-bit number, with the exception that there are now 32 bits that represent the value. Therefore, the <font color="#008000">''highest''</font> bit has a value 2<sup>31</sup> and the <font color="#008000">''lowest''</font> bit has value 2<sup>0</sup>.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|The bit with the highest power value is known as the <font color="#008000">high-order bit</font>, and in the same vein, the bit with the lowest power value is the <font color="#008000">low-order bit</font>. When a file or computer system uses <font color="#008000">little-endian formatting</font>, which is most often the case, the high-order bit is to the left and the low-order bit to the right. In <font color="#008000">big-endian formatting</font>, this is not the case - more information about endian ordering will be presented in a later chapter.
+
|align="justify" bgcolor="#E6E6E6"|The bit with the highest power value is known as the <font color="#008000">high-order bit</font>, and in the same vein, the bit with the lowest power value is the <font color="#008000">low-order bit</font>. When a file or computer system uses <font color="#008000">little-endian formatting</font>, which is most often the case, the high-order bit is to the left and the low-order bit to the right. In <font color="#008000">big-endian formatting</font>, this is not the case - more information about endian ordering will be presented in a later chapter.
 
|-
 
|-
 
|}
 
|}
Line 367: Line 367:
 
A 32-bit number in older programming languages is known as a <font color="#008000">''dword''</font> or a Long. In newer languages, this is known as an Integer.
 
A 32-bit number in older programming languages is known as a <font color="#008000">''dword''</font> or a Long. In newer languages, this is known as an Integer.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|<font color="#008000">Dword</font> is an abbreviation for <font color="#008000">Double Word</font>, meaning that a dword has double the number of bits that a word has (ie 32 = 2x16).
+
|align="justify" bgcolor="#E6E6E6"|<font color="#008000">Dword</font> is an abbreviation for <font color="#008000">Double Word</font>, meaning that a dword has double the number of bits that a word has (ie 32 = 2x16).
 
|-
 
|-
 
|}
 
|}
Line 377: Line 377:
 
64-bit numbers are not supported by some of the older programming languages - those that do call it a <font color="#008000">''qword''</font>. All newer programming languages refer to this data type as a Long.
 
64-bit numbers are not supported by some of the older programming languages - those that do call it a <font color="#008000">''qword''</font>. All newer programming languages refer to this data type as a Long.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|64-bit numbers are relatively new concepts in the computer world, brought on by the ever-increasing size of hard drives, and technologies such as <font color="#FF6600">DVD</font>. Old file systems such as <font color="#008000">FAT-32</font> (used by <font color="#FF6600">Windows 95</font> and <font color="#FF6600">Windows 98</font>) were, as the name suggests, built around 32-bit numbers, but this inherently caused a problem with large files. Because a 32-bit number has a maximum value of 4,294,967,295, it meant that files that were larger than 4.3GB are not possible. Furthermore, a hard drive could not contain more than 4.3GB of file data. Due to this problem, 64-bit numbers were introduced, which allows for practically infinite amounts of storage space. 64-bit numbers are used in more modern file systems (<font color="#008000">NTFS</font> for <font color="#FF6600">Windows XP</font>), and for technologies like <font color="#FF6600">DVD</font> that have large storage space.
+
|align="justify" bgcolor="#E6E6E6"|64-bit numbers are relatively new concepts in the computer world, brought on by the ever-increasing size of hard drives, and technologies such as <font color="#FF6600">DVD</font>. Old file systems such as <font color="#008000">FAT-32</font> (used by <font color="#FF6600">Windows 95</font> and <font color="#FF6600">Windows 98</font>) were, as the name suggests, built around 32-bit numbers, but this inherently caused a problem with large files. Because a 32-bit number has a maximum value of 4,294,967,295, it meant that files that were larger than 4.3GB are not possible. Furthermore, a hard drive could not contain more than 4.3GB of file data. Due to this problem, 64-bit numbers were introduced, which allows for practically infinite amounts of storage space. 64-bit numbers are used in more modern file systems (<font color="#008000">NTFS</font> for <font color="#FF6600">Windows XP</font>), and for technologies like <font color="#FF6600">DVD</font> that have large storage space.
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|&nbsp;
+
|align="justify" bgcolor="#E6E6E6"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|A similar situation occurred during the transition from <font color="#FF6600">Windows 3.1</font> to <font color="#FF6600">Windows 95</font>, where computer systems that were originally built on the <font color="#008000">FAT-16</font> 16-bit file system were upgraded to <font color="#008000">FAT-32</font>.
+
|align="justify" bgcolor="#E6E6E6"|A similar situation occurred during the transition from <font color="#FF6600">Windows 3.1</font> to <font color="#FF6600">Windows 95</font>, where computer systems that were originally built on the <font color="#008000">FAT-16</font> 16-bit file system were upgraded to <font color="#008000">FAT-32</font>.
 
|-
 
|-
 
|}
 
|}
Line 389: Line 389:
 
One of the most common tasks performed on a computer is word processing, so naturally we need some way of representing text in a document. A piece of text in a document is called a String, which more formally means a sequence of <font color="#008000">''characters''</font>.
 
One of the most common tasks performed on a computer is word processing, so naturally we need some way of representing text in a document. A piece of text in a document is called a String, which more formally means a sequence of <font color="#008000">''characters''</font>.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|You need to be careful when using the term <font color="#008000">character</font>, as it can be different depending on the programming language, and indeed depending on the language of your country. A character in older programming languages is usually the same as a <font color="#008000">byte</font>, whereas in newer languages it is often the same as a <font color="#008000">16-bit short</font>. If the game or file was developed in a primarily English-speaking country (as most are), characters will usually be bytes regardless of the programming language used to write the game. Games from non-English speaking countries will usually be 16-bit shorts.
+
|align="justify" bgcolor="#E6E6E6"|You need to be careful when using the term <font color="#008000">character</font>, as it can be different depending on the programming language, and indeed depending on the language of your country. A character in older programming languages is usually the same as a <font color="#008000">byte</font>, whereas in newer languages it is often the same as a <font color="#008000">16-bit short</font>. If the game or file was developed in a primarily English-speaking country (as most are), characters will usually be bytes regardless of the programming language used to write the game. Games from non-English speaking countries will usually be 16-bit shorts.
 
|-
 
|-
 
|}
 
|}
  
Although there are many languages in the world, the first Latin language used in the Western world is English. The English script consists of 52 letters (upper and lower case), 10 numbers, and about 30 symbols. Seeing as though this adds up to about 92, it seems quite logical that we can represent each character as a different byte value (remembering that a byte supports up to 255 different numbers). This is exactly what happens when you open a text document in a word processor – the word processor reads the bytes of the file and represents each byte value as a character.
+
Although there are many languages in the world, the first Latin language used in the Western world is English. The English script consists of 52 letters (upper and lower case), 10 numbers, and about 30 symbols. Seeing as though this adds up to about 92, it seems quite logical that we can represent each character as a different byte value (remembering that a byte supports up to 255 different numbers). This is exactly what happens when you open a text document in a word processor the word processor reads the bytes of the file and represents each byte value as a character.
  
For example, when the word processor reads a byte with value 65, it displays the letter <nowiki>’</nowiki>A<nowiki>’</nowiki>. The byte value 100 represents the letter <nowiki>’</nowiki>d<nowiki>’</nowiki>. Therefore, you can open any file in a word processor and it will be displayed as characters, regardless of whether it is a text document or not - the word processor simply doesn<nowiki>’</nowiki>t know that it isn<nowiki>’</nowiki>t a text file. The representation of a byte as a character is defined as <font color="#008000">''ASCII''</font>, for which the character associations are listed in <font color="#800080"><u>Appendix 2</u></font>.
+
For example, when the word processor reads a byte with value 65, it displays the letter "A". The byte value 100 represents the letter "d". Therefore, you can open any file in a word processor and it will be displayed as characters, regardless of whether it is a text document or not - the word processor simply doesn’t know that it isn’t a text file. The representation of a byte as a character is defined as <font color="#008000">''ASCII''</font>, for which the character associations are listed in <font color="#800080"><u>Appendix 2</u></font>.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|<font color="#008000">ASCII</font> stands for <font color="#008000">American Standard Code for Information Interchange</font>, which was originally defined as a 7-bit character system (as all letters and numbers account for less than 128 values). As computer systems evolved, bytes became the standard unit of the computer, and as such the ASCII standard was adjusted into a full 8-bit character system. The original letters remained the same, with the 8th bit having the value 0. The newly-created 128 characters (the ones with the 8th bit equal to 1) were assigned to additional common characters such as letters with accents, foreign currency symbols, and other miscellaneous symbols like fractions and degrees.
+
|align="justify" bgcolor="#E6E6E6"|<font color="#008000">ASCII</font> stands for <font color="#008000">American Standard Code for Information Interchange</font>, which was originally defined as a 7-bit character system (as all letters and numbers account for less than 128 values). As computer systems evolved, bytes became the standard unit of the computer, and as such the ASCII standard was adjusted into a full 8-bit character system. The original letters remained the same, with the 8th bit having the value 0. The newly-created 128 characters (the ones with the 8th bit equal to 1) were assigned to additional common characters such as letters with accents, foreign currency symbols, and other miscellaneous symbols like fractions and degrees.
 
|-
 
|-
 
|}
 
|}
Line 410: Line 410:
  
 
{|border="0" cellspacing="2" width="100%"
 
{|border="0" cellspacing="2" width="100%"
|align = "justify"|<font color="#000080">Original:
+
|align="justify"|<font color="#000080">Original:
|align = "justify"|</font>When I run fast, my legs get tired.
+
|align="justify"|</font>When I run fast, my legs get tired.
 
|-
 
|-
|align = "justify"|<font color="#000080">ASCII:
+
|align="justify"|<font color="#000080">ASCII:
|align = "justify"|</font>When I run fast, my legs get tired.
+
|align="justify"|</font>When I run fast, my legs get tired.
 
|-
 
|-
|align = "justify"|<font color="#000080">Unicode:
+
|align="justify"|<font color="#000080">Unicode:
|align = "justify"|</font>W<font color="#800000">'''.'''</font>h<font color="#800000">'''.'''</font>e<font color="#800000">'''.'''</font>n<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>I<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>r<font color="#800000">'''.'''</font>u<font color="#800000">'''.'''</font>n<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>f<font color="#800000">'''.'''</font>a<font color="#800000">'''.'''</font>s<font color="#800000">'''.'''</font>t<font color="#800000">'''.'''</font>,<font color="#800000">''' .'''</font> <font color="#800000">'''.'''</font>m<font color="#800000">'''.'''</font>y<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>l<font color="#800000">'''.'''</font>e<font color="#800000">'''.'''</font>g<font color="#800000">'''.'''</font>s<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>g<font color="#800000">'''.'''</font>e<font color="#800000">'''.'''</font>t<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>t<font color="#800000">'''.'''</font>i<font color="#800000">'''.'''</font>r<font color="#800000">'''.'''</font>e<font color="#800000">'''.'''</font>d<font color="#800000">'''.'''</font>.<font color="#800000">''' .'''</font>
+
|align="justify"|</font>W<font color="#800000">'''.'''</font>h<font color="#800000">'''.'''</font>e<font color="#800000">'''.'''</font>n<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>I<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>r<font color="#800000">'''.'''</font>u<font color="#800000">'''.'''</font>n<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>f<font color="#800000">'''.'''</font>a<font color="#800000">'''.'''</font>s<font color="#800000">'''.'''</font>t<font color="#800000">'''.'''</font>,<font color="#800000">''' .'''</font> <font color="#800000">'''.'''</font>m<font color="#800000">'''.'''</font>y<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>l<font color="#800000">'''.'''</font>e<font color="#800000">'''.'''</font>g<font color="#800000">'''.'''</font>s<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>g<font color="#800000">'''.'''</font>e<font color="#800000">'''.'''</font>t<font color="#800000">'''.'''</font> <font color="#800000">'''.'''</font>t<font color="#800000">'''.'''</font>i<font color="#800000">'''.'''</font>r<font color="#800000">'''.'''</font>e<font color="#800000">'''.'''</font>d<font color="#800000">'''.'''</font>.<font color="#800000">''' .'''</font>
 
|-
 
|-
 
|}
 
|}
Line 432: Line 432:
 
So how do we write a number in power 16? As mentioned earlier, the byte value is split up into 2 characters, with the first number representing 16<sup>1</sup> and the second number representing 16<sup>0</sup>. You should notice that this is the same way bits are joined together to form a byte.
 
So how do we write a number in power 16? As mentioned earlier, the byte value is split up into 2 characters, with the first number representing 16<sup>1</sup> and the second number representing 16<sup>0</sup>. You should notice that this is the same way bits are joined together to form a byte.
  
The second number of the pair can take any value between 0 and 16 (labelled 0 through F), where the value represents <font color="#800000">''number''</font> x 16<sup>0</sup>''. ''So, if the second number was <font color="#800000">6</font>, it would represent the number <font color="#800000">6</font>x16<sup>0</sup> –the value 6. if the second number was <font color="#800000">B</font>, it would similarly represent the value <font color="#800000">11</font>x16<sup>0</sup> – the value 11.
+
The second number of the pair can take any value between 0 and 16 (labelled 0 through F), where the value represents <font color="#800000">''number''</font> x 16<sup>0</sup>''. ''So, if the second number was <font color="#800000">6</font>, it would represent the number <font color="#800000">6</font>x16<sup>0</sup> –the value 6. if the second number was <font color="#800000">B</font>, it would similarly represent the value <font color="#800000">11</font>x16<sup>0</sup> the value 11.
  
The first number of the pair represents the value <font color="#800000">''number''</font> x 16<sup>1</sup>. So, if the first number was <font color="#800000">2</font>, it would represent the value <font color="#800000">2</font>x16<sup>1</sup>'' ''– the value 32.
+
The first number of the pair represents the value <font color="#800000">''number''</font> x 16<sup>1</sup>. So, if the first number was <font color="#800000">2</font>, it would represent the value <font color="#800000">2</font>x16<sup>1</sup>'' ''the value 32.
  
 
Lets look at a full example now. If we are given the hexadecimal value <font color="#800000">1F</font>, what does it represent? The number <font color="#800000">1</font> means <font color="#800000">1</font>x16<sup>1</sup>, and the <font color="#800000">F</font> means <font color="#800000">15</font>x16<sup>0</sup>''.'' Added together, we get 16 <nowiki>+</nowiki> 15, the value 31. Similarly, the hexadecimal number <font color="#800000">E3</font> represents <font color="#800000">14</font>x16<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">3</font>x16<sup>0</sup>, the number 227.
 
Lets look at a full example now. If we are given the hexadecimal value <font color="#800000">1F</font>, what does it represent? The number <font color="#800000">1</font> means <font color="#800000">1</font>x16<sup>1</sup>, and the <font color="#800000">F</font> means <font color="#800000">15</font>x16<sup>0</sup>''.'' Added together, we get 16 <nowiki>+</nowiki> 15, the value 31. Similarly, the hexadecimal number <font color="#800000">E3</font> represents <font color="#800000">14</font>x16<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">3</font>x16<sup>0</sup>, the number 227.
Line 443: Line 443:
 
Hopefully by now you can clearly see how numbers are stored in files, and even how strings are stored, but what about negative numbers? Luckily, negative numbers are really easy.
 
Hopefully by now you can clearly see how numbers are stored in files, and even how strings are stored, but what about negative numbers? Luckily, negative numbers are really easy.
  
There are only 2 possible types of numbers – either positive or negative. This maps perfectly with a single bit of value 0 or 1 respectively.
+
There are only 2 possible types of numbers either positive or negative. This maps perfectly with a single bit of value 0 or 1 respectively.
  
 
Rather than add an extra bit to a number, we take the bit with the highest value and interpret it as a positive or negative sign. In an 8-bit number, for example, you would count all the bits from 2<sup>0</sup> to 2<sup>6</sup>, and the value of the 2<sup>7</sup> bit will determine whether the value is positive or negative.
 
Rather than add an extra bit to a number, we take the bit with the highest value and interpret it as a positive or negative sign. In an 8-bit number, for example, you would count all the bits from 2<sup>0</sup> to 2<sup>6</sup>, and the value of the 2<sup>7</sup> bit will determine whether the value is positive or negative.
Line 449: Line 449:
 
You should note that because the highest bit is being used for another purpose (identifying positive/negative), it cannot be used as part of the number itself. This effectively cuts the possible values of the number in half. In our example, you would normally be able to have any value between 0 and 255, however with the negative bit we now have numbers between -127 and 128. As there is no such thing as - 0, the bit code 10000000 is given the value 128
 
You should note that because the highest bit is being used for another purpose (identifying positive/negative), it cannot be used as part of the number itself. This effectively cuts the possible values of the number in half. In our example, you would normally be able to have any value between 0 and 255, however with the negative bit we now have numbers between -127 and 128. As there is no such thing as - 0, the bit code 10000000 is given the value 128
  
Here we need to introduce a way of knowing whether a number will be positive-only, or a positive/negative number. We therefore use the term <font color="#008000">''signed''</font> to indicate that the highest bit is used as a sign, or the term <font color="#008000">''unsigned''</font> indicating the number is always positive. Therefore, if you are told a 16-bit number is unsigned, you will know the number ranges between 0 and 65535. However, if it was a signed 16-bit number, it would range between –32767 and 32768.
+
Here we need to introduce a way of knowing whether a number will be positive-only, or a positive/negative number. We therefore use the term <font color="#008000">''signed''</font> to indicate that the highest bit is used as a sign, or the term <font color="#008000">''unsigned''</font> indicating the number is always positive. Therefore, if you are told a 16-bit number is unsigned, you will know the number ranges between 0 and 65535. However, if it was a signed 16-bit number, it would range between –32767 and 32768.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|The type of file usually determines whether the numbers are signed or unsigned. For example, <font color="#008000">archives</font> and <font color="#008000">images</font> are almost solely <font color="#008000">''unsigned''</font> values. <font color="#008000">3D</font>-related files are often <font color="#008000">''signed''</font>, as it is possible to have points in the negative as well as the positive plane.
+
|align="justify" bgcolor="#E6E6E6"|The type of file usually determines whether the numbers are signed or unsigned. For example, <font color="#008000">archives</font> and <font color="#008000">images</font> are almost solely <font color="#008000">''unsigned''</font> values. <font color="#008000">3D</font>-related files are often <font color="#008000">''signed''</font>, as it is possible to have points in the negative as well as the positive plane.
 
|-
 
|-
 
|}
 
|}
Line 461: Line 461:
 
If you paid close attention, you would have noticed that whenever we calculate a number, the bit with the highest value was always on the left, and the lowest value on the right. This is regarded as almost a standard today amongst PC users, however some files, programs, and computer systems decided it was better to read it the other way around (right-to-left instead of left-to-right). So once again, we need to define some terms so that people know what order we are talking about.
 
If you paid close attention, you would have noticed that whenever we calculate a number, the bit with the highest value was always on the left, and the lowest value on the right. This is regarded as almost a standard today amongst PC users, however some files, programs, and computer systems decided it was better to read it the other way around (right-to-left instead of left-to-right). So once again, we need to define some terms so that people know what order we are talking about.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|<font color="#008000">Little-Endian</font> order is the one we will be using in this document, and unless stated specifically you should assume that Little-Endian order is used in any file. The alternate is <font color="#008000">Big-Endian</font> ordering.
+
|align="justify" bgcolor="#E6E6E6"|<font color="#008000">Little-Endian</font> order is the one we will be using in this document, and unless stated specifically you should assume that Little-Endian order is used in any file. The alternate is <font color="#008000">Big-Endian</font> ordering.
 
|-
 
|-
 
|}
 
|}
Line 472: Line 472:
 
If you have been following the document so far, you would quickly calculate the value of this 8-bit number as being
 
If you have been following the document so far, you would quickly calculate the value of this 8-bit number as being
  
<font color="#800000">1</font>x2<sup>7</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>6</sup> <nowiki>+</nowiki> … <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>0</sup> = 142
+
<font color="#800000">1</font>x2<sup>7</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>6</sup> <nowiki>+</nowiki> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>1</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>0</sup> = 142
  
 
This is an example of Little-Endian ordering. However, in Big-Endian ordering we need to read the number in the opposite direction
 
This is an example of Little-Endian ordering. However, in Big-Endian ordering we need to read the number in the opposite direction
  
<font color="#800000">1</font>x2<sup>0</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>1</sup> <nowiki>+</nowiki> … <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>6</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>7</sup> = 113
+
<font color="#800000">1</font>x2<sup>0</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>1</sup> <nowiki>+</nowiki> <nowiki>+</nowiki> <font color="#800000">1</font>x2<sup>6</sup> <nowiki>+</nowiki> <font color="#800000">0</font>x2<sup>7</sup> = 113
  
It is always important to read the numbers in the correct order, otherwise you will end up with numbers that are meaningless and incorrect. As mentioned, if you don<nowiki>’</nowiki>t know which order to use, assume Little-Endian ordering - we will be using Little-Endian order for all examples in this document.
+
It is always important to read the numbers in the correct order, otherwise you will end up with numbers that are meaningless and incorrect. As mentioned, if you don’t know which order to use, assume Little-Endian ordering - we will be using Little-Endian order for all examples in this document.
  
 
===File Offsets===
 
===File Offsets===
Line 498: Line 498:
 
There are literally thousands of different archives out there, however most archives will conform to one of several basic patterns. Here we present the basic archive patterns so you can understand how the files are built, and how they can be read. Once you know the patterns, you can identify archive formats much faster.
 
There are literally thousands of different archives out there, however most archives will conform to one of several basic patterns. Here we present the basic archive patterns so you can understand how the files are built, and how they can be read. Once you know the patterns, you can identify archive formats much faster.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|Note that the samples presented here list some fields like the <font color="#008000">number of files</font> and the <font color="#008000">header</font>. These fields are not fixed, and indeed may be totally different to the structure of your archive. You should use the samples presented here as a guide to the overall structure, not as a exact guide to a specific format.
+
|align="justify" bgcolor="#E6E6E6"|Note that the samples presented here list some fields like the <font color="#008000">number of files</font> and the <font color="#008000">header</font>. These fields are not fixed, and indeed may be totally different to the structure of your archive. You should use the samples presented here as a guide to the overall structure, not as a exact guide to a specific format.
 
|-
 
|-
 
|}
 
|}
Line 505: Line 505:
 
In these examples, the numerical value at the start of each field indicates the number of bytes used to contain the field value. For example, the line <font color="#000080">4 - Directory Offset</font> shows that there are 4 bytes used to store the directory offset. This field would thus be read as a 32-bit number, as described earlier.
 
In these examples, the numerical value at the start of each field indicates the number of bytes used to contain the field value. For example, the line <font color="#000080">4 - Directory Offset</font> shows that there are 4 bytes used to store the directory offset. This field would thus be read as a 32-bit number, as described earlier.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|Note that most fields will either be <font color="#008000">2</font>, <font color="#008000">4</font>, or <font color="#008000">8</font> bytes in length, corresponding to the data types presented earlier (<font color="#008000">16-bit</font>, <font color="#008000">32-bit</font>, and <font color="#008000">64-bit</font> respectively). The main exception is the filename field, which naturally could be any arbitrary length.
+
|align="justify" bgcolor="#E6E6E6"|Note that most fields will either be <font color="#008000">2</font>, <font color="#008000">4</font>, or <font color="#008000">8</font> bytes in length, corresponding to the data types presented earlier (<font color="#008000">16-bit</font>, <font color="#008000">32-bit</font>, and <font color="#008000">64-bit</font> respectively). The main exception is the filename field, which naturally could be any arbitrary length.
 
|-
 
|-
 
|}
 
|}
Line 518: Line 518:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Archive Header</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Archive Header</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|4 - Header Tag (String)<br>4 - Number of Files
+
|align="justify" colspan="2"|4 - Header Tag (String)<br>4 - Number of Files
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Directory</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Directory</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">File Data</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">File Data</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
 
|}
 
|}
Line 587: Line 587:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Archive Header</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Archive Header</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|4 - Header Tag (String)<br>4 - Number of Files<br>4 - <font color="#000080">''Files Directory''</font> Offset<br>4 - <font color="#000080">''Filenames Directory''</font> Offset
+
|align="justify" colspan="2"|4 - Header Tag (String)<br>4 - Number of Files<br>4 - <font color="#000080">''Files Directory''</font> Offset<br>4 - <font color="#000080">''Filenames Directory''</font> Offset
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Files Directory</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Files Directory</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size
+
|align="justify"|4 - File Offset<br>4 - File Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size
+
|align="justify"|4 - File Offset<br>4 - File Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size
+
|align="justify"|4 - File Offset<br>4 - File Size
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Filenames Directory</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Filenames Directory</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Filename
+
|align="justify"|X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Filename
+
|align="justify"|X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Filename
+
|align="justify"|X - Filename
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">File Data</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">File Data</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
 
|}
 
|}
Line 681: Line 681:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Archive Header</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Archive Header</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|4 - Header Tag (String)<br>4 - Number of Files<br>4 - <font color="#000080">''Offsets Directory''</font> Offset<br>4 - <font color="#000080">''Lengths Directory''</font> Offset<br>4 - <font color="#000080">''Filenames Directory''</font> Offset
+
|align="justify" colspan="2"|4 - Header Tag (String)<br>4 - Number of Files<br>4 - <font color="#000080">''Offsets Directory''</font> Offset<br>4 - <font color="#000080">''Lengths Directory''</font> Offset<br>4 - <font color="#000080">''Filenames Directory''</font> Offset
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Offsets Directory</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Offsets Directory</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset
+
|align="justify"|4 - File Offset
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset
+
|align="justify"|4 - File Offset
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset
+
|align="justify"|4 - File Offset
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Lengths Directory</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Lengths Directory</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Size
+
|align="justify"|4 - File Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Size
+
|align="justify"|4 - File Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Size
+
|align="justify"|4 - File Size
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Filenames Directory</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Filenames Directory</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Filename
+
|align="justify"|X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Filename
+
|align="justify"|X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Filename
+
|align="justify"|X - Filename
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">File Data</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">File Data</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
 
|}
 
|}
Line 810: Line 810:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Archive Header</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Archive Header</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|4 - Number of Files
+
|align="justify" colspan="2"|4 - Number of Files
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Directory</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Directory</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify" colspan = "3"|<br><br><font color="#008000">''Example.dat''</font>
+
|align="justify" colspan="3"|<br><br><font color="#008000">''Example.dat''</font>
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">File Data</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">File Data</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
 
|}
 
|}
Line 876: Line 876:
 
Chunked Archives are a simple structure where the files are stored one after the other. Each file has its own header that gives information about the file, particularly the <font color="#008000">''file size''</font>. These archives, probably the simplest of all the archive types, are examined by reading the header of the file, skipping the file data, then repeating again for the remaining files until you reach the end of the archive.
 
Chunked Archives are a simple structure where the files are stored one after the other. Each file has its own header that gives information about the file, particularly the <font color="#008000">''file size''</font>. These archives, probably the simplest of all the archive types, are examined by reading the header of the file, skipping the file data, then repeating again for the remaining files until you reach the end of the archive.
  
One thing to note: these archives typically don<nowiki>’</nowiki>t store filenames, rather they store a 4-byte String that can be treated like the files<nowiki>’</nowiki> extension.
+
One thing to note: these archives typically don’t store filenames, rather they store a 4-byte String that can be treated like the file’s extension.
  
 
Here is a example of this archive type:
 
Here is a example of this archive type:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify" bgcolor = "#D9D9D9" colspan = "4"|<font color="#000080">Archive Header</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="4"|<font color="#000080">Archive Header</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "3"|4 - Header Tag (String)
+
|align="justify" colspan="3"|4 - Header Tag (String)
 
|-
 
|-
|align = "justify" colspan = "4"|&nbsp;
+
|align="justify" colspan="4"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "4"|<font color="#000080">Chunks</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="4"|<font color="#000080">Chunks</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "3"|<font color="#008000">File 1</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="3"|<font color="#008000">File 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Header 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Header 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Type (String)<br>4 - File Size
+
|align="justify"|4 - File Type (String)<br>4 - File Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "3"|<font color="#008000">File 2</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="3"|<font color="#008000">File 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Header 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Header 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Type (String)<br>4 - File Size
+
|align="justify"|4 - File Type (String)<br>4 - File Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "3"|<font color="#008000">…</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="3"|<font color="#008000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "3"|<font color="#008000">File ''n''</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="3"|<font color="#008000">File ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Header ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Header ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Type (String)<br>4 - File Size
+
|align="justify"|4 - File Type (String)<br>4 - File Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
 
|}
 
|}
Line 964: Line 964:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify" bgcolor = "#D9D9D9" colspan = "4"|<font color="#000080">Archive Header</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="4"|<font color="#000080">Archive Header</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "3"|4 - Header Tag (String)
+
|align="justify" colspan="3"|4 - Header Tag (String)
 
|-
 
|-
|align = "justify" colspan = "4"|&nbsp;
+
|align="justify" colspan="4"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "4"|<font color="#000080">Chunks</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="4"|<font color="#000080">Chunks</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "3"|<font color="#008000">File 1</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="3"|<font color="#008000">File 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Header 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Header 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Type (String)<br>4 - File Size<br>4 - Number Of Chunks<br>4 - Chunk Size
+
|align="justify"|4 - File Type (String)<br>4 - File Size<br>4 - Number Of Chunks<br>4 - Chunk Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data Chunk 1<br>X - File Data Chunk 2<br>…<br>X - File Data Chunk ''n''
+
|align="justify"|X - File Data Chunk 1<br>X - File Data Chunk 2<br><br>X - File Data Chunk ''n''
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "3"|<font color="#008000">File 2</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="3"|<font color="#008000">File 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Header 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Header 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Type (String)<br>4 - File Size<br>4 - Number Of Chunks<br>4 - Chunk Size
+
|align="justify"|4 - File Type (String)<br>4 - File Size<br>4 - Number Of Chunks<br>4 - Chunk Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data Chunk 1<br>X - File Data Chunk 2<br>…<br>X - File Data Chunk ''n''
+
|align="justify"|X - File Data Chunk 1<br>X - File Data Chunk 2<br><br>X - File Data Chunk ''n''
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "3"|<font color="#008000">…</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="3"|<font color="#008000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "3"|<font color="#008000">File ''n''</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="3"|<font color="#008000">File ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Header ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Header ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Type (String)<br>4 - File Size<br>4 - Number Of Chunks<br>4 - Chunk Size
+
|align="justify"|4 - File Type (String)<br>4 - File Size<br>4 - Number Of Chunks<br>4 - Chunk Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data Chunk 1<br>X - File Data Chunk 2<br>…<br>X - File Data Chunk ''n''
+
|align="justify"|X - File Data Chunk 1<br>X - File Data Chunk 2<br><br>X - File Data Chunk ''n''
 
|-
 
|-
 
|}
 
|}
Line 1,047: Line 1,047:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Archive Header</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Archive Header</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|4 - Header Tag (String)<br>4 - Number of Folders at the root<br>4 - Total Number of Files
+
|align="justify" colspan="2"|4 - Header Tag (String)<br>4 - Number of Folders at the root<br>4 - Total Number of Files
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Folder Entries</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Folder Entries</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">Folder Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">Folder Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name<br>4 - Number of Sub-folders in this folder<br>4 - Offset to the first Sub-folder entry for this folder<br>4 - Number of Files in this folder<br>4 - Offset to the first file entry for this folder
+
|align="justify"|X - Folder Name<br>4 - Number of Sub-folders in this folder<br>4 - Offset to the first Sub-folder entry for this folder<br>4 - Number of Files in this folder<br>4 - Offset to the first file entry for this folder
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">Folder Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">Folder Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name<br>4 - Number of Sub-folders in this folder<br>4 - Offset to the first Sub-folder entry for this folder<br>4 - Number of Files in this folder<br>4 - Offset to the first file entry for this folder
+
|align="justify"|X - Folder Name<br>4 - Number of Sub-folders in this folder<br>4 - Offset to the first Sub-folder entry for this folder<br>4 - Number of Files in this folder<br>4 - Offset to the first file entry for this folder
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">Folder Entry ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">Folder Entry ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name<br>4 - Number of Sub-folders in this folder<br>4 - Offset to the first Sub-folder entry for this folder<br>4 - Number of Files in this folder<br>4 - Offset to the first file entry for this folder
+
|align="justify"|X - Folder Name<br>4 - Number of Sub-folders in this folder<br>4 - Offset to the first Sub-folder entry for this folder<br>4 - Number of Files in this folder<br>4 - Offset to the first file entry for this folder
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">File Entries</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">File Entries</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">File Data</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">File Data</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
 
|}
 
|}
Line 1,151: Line 1,151:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Archive Header</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Archive Header</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|4 - Header Tag (String) <font color="#008000">HEAD</font><br>4 - Number of Folder at the root 1<br>4 - Total Number of Files 3
+
|align="justify" colspan="2"|4 - Header Tag (String) <font color="#008000">HEAD</font><br>4 - Number of Folder at the root 1<br>4 - Total Number of Files 3
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Folder Entries</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Folder Entries</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">Folder Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">Folder Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name <font color="#008000">data</font><br>4 - Number of Sub-folders in this folder 2<br>4 - Offset to first Sub-folder offset to Folder Entry 2<br>4 - Number of Files in this folder 0<br>4 - Offset to first file entry 0
+
|align="justify"|X - Folder Name <font color="#008000">data</font><br>4 - Number of Sub-folders in this folder 2<br>4 - Offset to first Sub-folder offset to Folder Entry 2<br>4 - Number of Files in this folder 0<br>4 - Offset to first file entry 0
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">Folder Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">Folder Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name <font color="#008000">sounds</font><br>4 - Number of Sub-folders in this folder 0<br>4 - Offset to first Sub-folder 0<br>4 - Number of Files in this folder 2<br>4 - Offset to first file entry offset to File Entry 1
+
|align="justify"|X - Folder Name <font color="#008000">sounds</font><br>4 - Number of Sub-folders in this folder 0<br>4 - Offset to first Sub-folder 0<br>4 - Number of Files in this folder 2<br>4 - Offset to first file entry offset to File Entry 1
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">Folder Entry 3</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">Folder Entry 3</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name <font color="#008000">images</font><br>4 - Number of Sub-folders in this folder 1<br>4 - Offset to first Sub-folder offset to Folder Entry 4<br>4 - Number of Files in this folder 0<br>4 - Offset to first file entry 0
+
|align="justify"|X - Folder Name <font color="#008000">images</font><br>4 - Number of Sub-folders in this folder 1<br>4 - Offset to first Sub-folder offset to Folder Entry 4<br>4 - Number of Files in this folder 0<br>4 - Offset to first file entry 0
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">Folder Entry 4</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">Folder Entry 4</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name <font color="#008000">temp</font><br>4 - Number of Sub-folders in this folder 0<br>4 - Offset to first Sub-folder 0<br>4 - Number of Files in this folder 1<br>4 - Offset to first file entry offset to File Entry 3
+
|align="justify"|X - Folder Name <font color="#008000">temp</font><br>4 - Number of Sub-folders in this folder 0<br>4 - Offset to first Sub-folder 0<br>4 - Number of Files in this folder 1<br>4 - Offset to first file entry offset to File Entry 3
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">File Entries</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">File Entries</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset <font color="#008000">offset to File Data 1</font><br>4 - File Size length of File Data 1<br>X - Filename snd1.wav
+
|align="justify"|4 - File Offset <font color="#008000">offset to File Data 1</font><br>4 - File Size length of File Data 1<br>X - Filename snd1.wav
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset <font color="#008000">offset to File Data 2</font><br>4 - File Size length of File Data 2<br>X - Filename snd2.wav
+
|align="justify"|4 - File Offset <font color="#008000">offset to File Data 2</font><br>4 - File Size length of File Data 2<br>X - Filename snd2.wav
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 3</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 3</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset <font color="#008000">offset to File Data 3</font><br>4 - File Size length of File Data 3<br>X - Filename pic1.bmp
+
|align="justify"|4 - File Offset <font color="#008000">offset to File Data 3</font><br>4 - File Size length of File Data 3<br>X - Filename pic1.bmp
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">File Data</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">File Data</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data <font color="#008000">the data for file snd1.wav</font>
+
|align="justify"|X - File Data <font color="#008000">the data for file snd1.wav</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data <font color="#008000">the data for file snd2.wav</font>
+
|align="justify"|X - File Data <font color="#008000">the data for file snd2.wav</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 3</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 3</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data <font color="#008000">the data for file pic1.bmp</font>
+
|align="justify"|X - File Data <font color="#008000">the data for file pic1.bmp</font>
 
|-
 
|-
 
|}
 
|}
Line 1,252: Line 1,252:
 
We jump forward to the offset for the first file entry and read 1 file entry, called pic1.bmp (File Entry 3). We know that the total number of files is 3, so now we have finished reading the tree.
 
We jump forward to the offset for the first file entry and read 1 file entry, called pic1.bmp (File Entry 3). We know that the total number of files is 3, so now we have finished reading the tree.
  
Using this method, we can build up a complex directory tree. This type of archive is usually slightly smaller in size than the plain directory archive, because the filenames don<nowiki>’</nowiki>t have to repeat the entire folder string for each entry, however the compromise is that it takes longer to read because you are jumping all over the place. For this reason, and the fact that it is a very complex structure, only a few games use this type of structure.
+
Using this method, we can build up a complex directory tree. This type of archive is usually slightly smaller in size than the plain directory archive, because the filenames don’t have to repeat the entire folder string for each entry, however the compromise is that it takes longer to read because you are jumping all over the place. For this reason, and the fact that it is a very complex structure, only a few games use this type of structure.
  
 
===Nested Tree Archives===
 
===Nested Tree Archives===
Line 1,260: Line 1,260:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify" bgcolor = "#D9D9D9" colspan = "7"|<font color="#000080">Archive Header</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="7"|<font color="#000080">Archive Header</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "6"|4 - Header Tag (String)<br>4 - Number of Folders at the root<br>4 - Total Number of Files
+
|align="justify" colspan="6"|4 - Header Tag (String)<br>4 - Number of Folders at the root<br>4 - Total Number of Files
 
|-
 
|-
|align = "justify" colspan = "7"|&nbsp;
+
|align="justify" colspan="7"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "7"|<font color="#000080">Entries</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="7"|<font color="#000080">Entries</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "6"|<font color="#800000">Folder Entry 1</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="6"|<font color="#800000">Folder Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "5"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
+
|align="justify" colspan="5"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "5"|<font color="#008000">Sub-Folder Entries 1</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="5"|<font color="#008000">Sub-Folder Entries 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "4"|&nbsp;
+
|align="justify" colspan="4"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6"|<font color="#800000">Sub-Folder Entry 1a</font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#800000">Sub-Folder Entry 1a</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
+
|align="justify"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0"|<font color="#008000">Sub-Folder Entries 1.1</font>
+
|align="justify" bgcolor="#E0E0E0"|<font color="#008000">Sub-Folder Entries 1.1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|&nbsp;
+
|align="justify" colspan="2"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6"|<font color="#800000">Sub-Folder Entry 1.1a</font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#800000">Sub-Folder Entry 1.1a</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
+
|align="justify"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|&nbsp;
+
|align="justify" colspan="2"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|&nbsp;
+
|align="justify" colspan="2"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6"|<font color="#800000">Sub-Folder Entry 1.1''n''</font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#800000">Sub-Folder Entry 1.1''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
+
|align="justify"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0"|<font color="#008000">File Entries 1.1</font>
+
|align="justify" bgcolor="#E0E0E0"|<font color="#008000">File Entries 1.1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|&nbsp;
+
|align="justify" colspan="2"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6"|<font color="#800000">File Entry 1.1a</font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#800000">File Entry 1.1a</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|&nbsp;
+
|align="justify" colspan="2"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|&nbsp;
+
|align="justify" colspan="2"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6"|<font color="#800000">File Entry 1.1''n''</font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#800000">File Entry 1.1''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "4"|&nbsp;
+
|align="justify" colspan="4"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E0E0E0"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "4"|&nbsp;
+
|align="justify" colspan="4"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0"|<font color="#800000">Sub-Folder Entry 1''n''</font>
+
|align="justify" bgcolor="#E0E0E0"|<font color="#800000">Sub-Folder Entry 1''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
+
|align="justify"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "5"|<font color="#008000">File Entries 1</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="5"|<font color="#008000">File Entries 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "4"|&nbsp;
+
|align="justify" colspan="4"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6"|<font color="#800000">File Entry 1a</font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#800000">File Entry 1a</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "4"|&nbsp;
+
|align="justify" colspan="4"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "4"|&nbsp;
+
|align="justify" colspan="4"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6"|<font color="#800000">File Entry 1''n''</font>
+
|align="justify" bgcolor="#E6E6E6"|<font color="#800000">File Entry 1''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|4 - File Offset<br>4 - File Size<br>X - Filename
+
|align="justify"|4 - File Offset<br>4 - File Size<br>X - Filename
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "6"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="6"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "6"|<font color="#800000">Folder Entry ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="6"|<font color="#800000">Folder Entry ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "5"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
+
|align="justify" colspan="5"|X - Folder Name<br>4 - Number of Sub-folders<br>4 - Number of Files
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "5"|<font color="#008000">Sub-Folder Entries ''n''</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="5"|<font color="#008000">Sub-Folder Entries ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E0E0E0" colspan = "5"|<font color="#008000">File Entries ''n''</font>
+
|align="justify" bgcolor="#E0E0E0" colspan="5"|<font color="#008000">File Entries ''n''</font>
 
|-
 
|-
|align = "justify" colspan = "7"|&nbsp;
+
|align="justify" colspan="7"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "7"|<font color="#000080">File Data</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="7"|<font color="#000080">File Data</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "6"|<font color="#800000">File Data 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="6"|<font color="#800000">File Data 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "5"|X - File Data
+
|align="justify" colspan="5"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "6"|<font color="#800000">File Data 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="6"|<font color="#800000">File Data 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "5"|X - File Data
+
|align="justify" colspan="5"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "6"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="6"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "6"|<font color="#800000">File Data ''n''</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="6"|<font color="#800000">File Data ''n''</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "5"|X - File Data
+
|align="justify" colspan="5"|X - File Data
 
|-
 
|-
 
|}
 
|}
Line 1,482: Line 1,482:
 
'''method '''<font color="#000080">'''readArchive'''</font>'''()<nowiki>{</nowiki>'''
 
'''method '''<font color="#000080">'''readArchive'''</font>'''()<nowiki>{</nowiki>'''
  
'''   read ('''<font color="#800000">'''FolderEntry'''</font>''');'''
+
''' read ('''<font color="#800000">'''FolderEntry'''</font>''');'''
  
'''   for each ('''<font color="#008000">'''sub-folder'''</font>''')<nowiki>{</nowiki>'''
+
''' for each ('''<font color="#008000">'''sub-folder'''</font>''')<nowiki>{</nowiki>'''
  
'''       <font color="#000080">readArchive'''</font>'''();'''
+
'''   <font color="#000080">readArchive'''</font>'''();'''
  
'''       <nowiki>}</nowiki>'''
+
'''   <nowiki>}</nowiki>'''
  
'''   for each ('''<font color="#008000">'''file'''</font>''')<nowiki>{</nowiki>'''
+
''' for each ('''<font color="#008000">'''file'''</font>''')<nowiki>{</nowiki>'''
  
'''       read ('''<font color="#800000">'''FileEntry'''</font>''');'''
+
'''   read ('''<font color="#800000">'''FileEntry'''</font>''');'''
  
'''       <nowiki>}</nowiki>'''
+
'''   <nowiki>}</nowiki>'''
  
'''   <nowiki>}</nowiki>'''
+
''' <nowiki>}</nowiki>'''
  
 
So, you begin by reading a <font color="#800000">FolderEntry</font>. If the entry has <font color="#008000">sub-folders</font> in it, you must immediately read the entries for those sub-folders, by repeating the process <font color="#000080">from the beginning</font>. When all the sub-folder entries for this <font color="#800000">FolderEntry</font> have been read, you can then progress and read the <font color="#800000">FileEntries</font> for the folder.
 
So, you begin by reading a <font color="#800000">FolderEntry</font>. If the entry has <font color="#008000">sub-folders</font> in it, you must immediately read the entries for those sub-folders, by repeating the process <font color="#000080">from the beginning</font>. When all the sub-folder entries for this <font color="#800000">FolderEntry</font> have been read, you can then progress and read the <font color="#800000">FileEntries</font> for the folder.
Line 1,536: Line 1,536:
 
This field gives the length of the data for a particular file. Sometimes, if each file has its own <font color="#008000">''File Header''</font>, this length is included in the file size, so you may need to do some minor subtractions to get the length of the file data only.
 
This field gives the length of the data for a particular file. Sometimes, if each file has its own <font color="#008000">''File Header''</font>, this length is included in the file size, so you may need to do some minor subtractions to get the length of the file data only.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|The <font color="#008000">File Header</font> is any fields the appear just before the data for each file. Most archives do not have File Headers, but if they exist then they will usually only be 1 or 2 fields long.
+
|align="justify" bgcolor="#E6E6E6"|The <font color="#008000">File Header</font> is any fields the appear just before the data for each file. Most archives do not have File Headers, but if they exist then they will usually only be 1 or 2 fields long.
 
|-
 
|-
 
|}
 
|}
Line 1,544: Line 1,544:
 
This field tells you the position of the file data in the archive. Depending on the archive, this field will be either an <font color="#008000">''absolute''</font> offset, or an offset <font color="#008000">''relative''</font> to a certain position. If it is relative, you will need to add some value to the offset in order to obtain the correct value.
 
This field tells you the position of the file data in the archive. Depending on the archive, this field will be either an <font color="#008000">''absolute''</font> offset, or an offset <font color="#008000">''relative''</font> to a certain position. If it is relative, you will need to add some value to the offset in order to obtain the correct value.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|An <font color="#008000">absolute</font> position is the exact offset from the beginning of the archive. In other words, if you go to this offset, you will be at the start of the file data.
+
|align="justify" bgcolor="#E6E6E6"|An <font color="#008000">absolute</font> position is the exact offset from the beginning of the archive. In other words, if you go to this offset, you will be at the start of the file data.
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|&nbsp;
+
|align="justify" bgcolor="#E6E6E6"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|A <font color="#008000">relative</font> position means that the offset is relative to a certain position. If, for example, the offset is relative to the position <font color="#800000">2048</font>, then you would need to add <font color="#800000">2048</font> to the offset to get the location of the file data. If this is the case, there will usually be a field that tells you the relative position.
+
|align="justify" bgcolor="#E6E6E6"|A <font color="#008000">relative</font> position means that the offset is relative to a certain position. If, for example, the offset is relative to the position <font color="#800000">2048</font>, then you would need to add <font color="#800000">2048</font> to the offset to get the location of the file data. If this is the case, there will usually be a field that tells you the relative position.
 
|-
 
|-
 
|}
 
|}
  
 
====Number Of Files====
 
====Number Of Files====
This field is one of the more important fields - without knowing how many files there are in the archive, you wouldn<nowiki>’</nowiki>t know when to stop reading. Almost all archives have this field, usually in the <font color="#008000">''Archive Header''</font>.
+
This field is one of the more important fields - without knowing how many files there are in the archive, you Wouldn’t know when to stop reading. Almost all archives have this field, usually in the <font color="#008000">''Archive Header''</font>.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|The <font color="#008000">Archive Header</font> is the fields that occur at the very beginning of the archive, and contain general information such as the number of files, the header tag, and the length of the file data.
+
|align="justify" bgcolor="#E6E6E6"|The <font color="#008000">Archive Header</font> is the fields that occur at the very beginning of the archive, and contain general information such as the number of files, the header tag, and the length of the file data.
 
|-
 
|-
 
|}
 
|}
Line 1,571: Line 1,571:
  
 
====Filename====
 
====Filename====
When a game loads a resource into memory, it needs a way to uniquely identify the file amongst all others. A common way to do this is to store the filenames - it is guaranteed to be unique and allows people reading the archive to known the files<nowiki>’</nowiki> purpose.
+
When a game loads a resource into memory, it needs a way to uniquely identify the file amongst all others. A common way to do this is to store the filenames - it is guaranteed to be unique and allows people reading the archive to known the file’s purpose.
  
 
A filename is usually an ASCII string, but can occasionally be Unicode, particularly in big budget games that will be released internationally, or games that are developed in non-English speaking countries.
 
A filename is usually an ASCII string, but can occasionally be Unicode, particularly in big budget games that will be released internationally, or games that are developed in non-English speaking countries.
Line 1,587: Line 1,587:
 
An example: we have specified that the maximum filename length is <font color="#000080">20</font> characters. Our filename is <font color="#800000">example.dat</font>, which is only <font color="#000080">12</font> characters long, so therefore the remaining <font color="#000080">8</font> bytes are all nulls.
 
An example: we have specified that the maximum filename length is <font color="#000080">20</font> characters. Our filename is <font color="#800000">example.dat</font>, which is only <font color="#000080">12</font> characters long, so therefore the remaining <font color="#000080">8</font> bytes are all nulls.
  
Very rarely, the filename will be terminated with 1 null byte, and the remaining space filled up with random "junk" bytes. This can make it difficult to analyse the archive, but doesn<nowiki>’</nowiki>t make it any harder to read by a program.
+
Very rarely, the filename will be terminated with 1 null byte, and the remaining space filled up with random "junk" bytes. This can make it difficult to analyse the archive, but doesn’t make it any harder to read by a program.
  
 
An example: the maximum filename length is <font color="#000080">20</font> bytes. Our filename is <font color="#800000">example.dat</font>, which is <font color="#000080">12</font> characters long. We would write the filename, followed by <font color="#000080">1</font> null byte to indicate the end of the filename. The remaining <font color="#000080">7</font> bytes can be assigned randomly.
 
An example: the maximum filename length is <font color="#000080">20</font> bytes. Our filename is <font color="#800000">example.dat</font>, which is <font color="#000080">12</font> characters long. We would write the filename, followed by <font color="#000080">1</font> null byte to indicate the end of the filename. The remaining <font color="#000080">7</font> bytes can be assigned randomly.
Line 1,628: Line 1,628:
 
The benefit of a hash is that it is quick and efficient to read. A hash will always have the same number of bytes regardless of the input to the hash function, so it always has the same length when stored in a directory. The hash is almost guaranteed to be unique, so there are no risk of 2 different files having the same hash. Finally, a hash is numerical rather than characters in a string, so a hash can be looked up and stored better by a computer.
 
The benefit of a hash is that it is quick and efficient to read. A hash will always have the same number of bytes regardless of the input to the hash function, so it always has the same length when stored in a directory. The hash is almost guaranteed to be unique, so there are no risk of 2 different files having the same hash. Finally, a hash is numerical rather than characters in a string, so a hash can be looked up and stored better by a computer.
  
Hash fields are usually always 4 bytes, but 8 or 16 bytes are also common in some archives. They are easily identifiable because they will appear as random bytes that don<nowiki>’</nowiki>t equate to any usable value. For example, when you determine the value of the hash field, it will be obvious that it isn<nowiki>’</nowiki>t a file length or file offset because it will usually be a very large value.
+
Hash fields are usually always 4 bytes, but 8 or 16 bytes are also common in some archives. They are easily identifiable because they will appear as random bytes that don’t equate to any usable value. For example, when you determine the value of the hash field, it will be obvious that it isn’t a file length or file offset because it will usually be a very large value.
  
Hashes don<nowiki>’</nowiki>t usually contain null bytes either, so they stand out when stored in a directory with fields like file length or file offset (which have many null bytes in them).
+
Hashes don’t usually contain null bytes either, so they stand out when stored in a directory with fields like file length or file offset (which have many null bytes in them).
  
The downside with hashes are that once you have a hash, there is no way to convert it back into a filename. Therefore, if the archive uses hashes, you won<nowiki>’</nowiki>t easily be able to tell the type or purpose of each file, making it hard to do anything with them.
+
The downside with hashes are that once you have a hash, there is no way to convert it back into a filename. Therefore, if the archive uses hashes, you won’t easily be able to tell the type or purpose of each file, making it hard to do anything with them.
  
 
====Padding Multiple====
 
====Padding Multiple====
Line 1,660: Line 1,660:
 
Another field that is easy to validate is the <font color="#000080">file offset</font> field, if you choose a good archive. All you need to do is go to the offset for each file and see if it points you to a known file header. For example, if you open a sound archive, then a good header to look for is <font color="#800000">RIFF</font> as it indicates a <nowiki>*</nowiki>.wav sound file. Similarly, if opening a texture archive, look for common image headers such as <font color="#800000">BM</font> (<nowiki>*</nowiki>.bmp), <font color="#800000">GIF</font> (<nowiki>*</nowiki>.gif) and <font color="#800000">JFIF</font> (<nowiki>*</nowiki>.jpg). So if you pick the right archive, you can see whether the file offset field is correct.
 
Another field that is easy to validate is the <font color="#000080">file offset</font> field, if you choose a good archive. All you need to do is go to the offset for each file and see if it points you to a known file header. For example, if you open a sound archive, then a good header to look for is <font color="#800000">RIFF</font> as it indicates a <nowiki>*</nowiki>.wav sound file. Similarly, if opening a texture archive, look for common image headers such as <font color="#800000">BM</font> (<nowiki>*</nowiki>.bmp), <font color="#800000">GIF</font> (<nowiki>*</nowiki>.gif) and <font color="#800000">JFIF</font> (<nowiki>*</nowiki>.jpg). So if you pick the right archive, you can see whether the file offset field is correct.
  
If you think that an archive compresses its files, and you have found the <font color="#000080">file size</font> field, try looking for a <font color="#000080">decompressed file size</font> field for each entry – simply look for a field that is always a little larger than the size for the file.
+
If you think that an archive compresses its files, and you have found the <font color="#000080">file size</font> field, try looking for a <font color="#000080">decompressed file size</font> field for each entry simply look for a field that is always a little larger than the size for the file.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|Note that the best general compression techniques still aren<nowiki>’</nowiki>t particularly successful. Therefore, even though the decompressed file size field will be larger than the file size field, it shouldn<nowiki>’</nowiki>t be exceptionally large. There are many other fields like hashes that generate large numbers, but these fields will have values that are much larger than any compression algorithms can achieve.
+
|align="justify" bgcolor="#E6E6E6"|Note that the best general compression techniques still aren’t particularly successful. Therefore, even though the decompressed file size field will be larger than the file size field, it shouldn’t be exceptionally large. There are many other fields like hashes that generate large numbers, but these fields will have values that are much larger than any compression algorithms can achieve.
 
|-
 
|-
 
|}
 
|}
Line 1,670: Line 1,670:
  
 
==Encryption and Compression==
 
==Encryption and Compression==
When an archive is being developed, there are many different things that need to be considered. If an archive is very large, and you want it to be stored for efficiently, it is common to perform compression on the files, thus reducing their size on the hard disk. If the archive contains copyright material, or you don<nowiki>’</nowiki>t want people to access the archive contents, you can apply encryption to the archive or its files. Here we will present you with some of the ways to identify the techniques used by the archive, and how to work around them.
+
When an archive is being developed, there are many different things that need to be considered. If an archive is very large, and you want it to be stored for efficiently, it is common to perform compression on the files, thus reducing their size on the hard disk. If the archive contains copyright material, or you don’t want people to access the archive contents, you can apply encryption to the archive or its files. Here we will present you with some of the ways to identify the techniques used by the archive, and how to work around them.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|Please note that compression and encryption are very complex problems, and there are literally thousands of different ways to do this stuff. Here we try to give you a brief understanding, and some helpful pointers in the right direction, but this will be in no way complete or comprehensive. If you are interested in encryption or compression specifically, we suggest you locate a book or website devoted to this topic solely.
+
|align="justify" bgcolor="#E6E6E6"|Please note that compression and encryption are very complex problems, and there are literally thousands of different ways to do this stuff. Here we try to give you a brief understanding, and some helpful pointers in the right direction, but this will be in no way complete or comprehensive. If you are interested in encryption or compression specifically, we suggest you locate a book or website devoted to this topic solely.
 
|-
 
|-
 
|}
 
|}
Line 1,680: Line 1,680:
 
Bitwise operations can be regarded as simple logical steps where a simple comparison is made between 2 bytes, resulting in a single new byte. You can thing of this like any normal mathematical function, such as addition, where you are given 2 numbers and end up with 1 result. The primary operations are AND, OR, and XOR, however there are also some relatively uncommon operations such as NOT, SHL and SHR.
 
Bitwise operations can be regarded as simple logical steps where a simple comparison is made between 2 bytes, resulting in a single new byte. You can thing of this like any normal mathematical function, such as addition, where you are given 2 numbers and end up with 1 result. The primary operations are AND, OR, and XOR, however there are also some relatively uncommon operations such as NOT, SHL and SHR.
  
Bitwise operators are performed on bytes, but the comparison occurs at the bit level. Most, if not all, programming languages have pre-assigned methods for performing bitwise operations, which means that the programmer doesn<nowiki>’</nowiki>t need to do anything manually at the bit level.
+
Bitwise operators are performed on bytes, but the comparison occurs at the bit level. Most, if not all, programming languages have pre-assigned methods for performing bitwise operations, which means that the programmer doesn’t need to do anything manually at the bit level.
  
 
====AND====
 
====AND====
Line 1,698: Line 1,698:
  
 
{|border="0" cellspacing="2" width="100%"
 
{|border="0" cellspacing="2" width="100%"
|align = "justify"|01111011 (123)
+
|align="justify"|01111011 (123)
|align = "justify"|(AND)
+
|align="justify"|(AND)
 
|-
 
|-
 
|}
 
|}
Line 1,720: Line 1,720:
 
00001100 (12)
 
00001100 (12)
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify"|01111011 (123)
+
|align="justify"|01111011 (123)
 
|-
 
|-
 
|}
 
|}
Line 1,744: Line 1,744:
 
00001100 (12)
 
00001100 (12)
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify"|01111011 (123)
+
|align="justify"|01111011 (123)
 
|-
 
|-
 
|}
 
|}
Line 1,757: Line 1,757:
 
01110111 (119)
 
01110111 (119)
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify"|01111011 (123)
+
|align="justify"|01111011 (123)
 
|-
 
|-
 
|}
 
|}
Line 1,773: Line 1,773:
 
Example: NOT 12
 
Example: NOT 12
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify"|00001100 (12)
+
|align="justify"|00001100 (12)
 
|-
 
|-
 
|}
 
|}
Line 1,786: Line 1,786:
 
11110011 (243)
 
11110011 (243)
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify"|00001100 (12)
+
|align="justify"|00001100 (12)
 
|-
 
|-
 
|}
 
|}
  
 
====SHL====
 
====SHL====
The shift-left (SHL) operation moves all the bits to the left by a certain amount. The maximum shift for a byte is 7, because when you shift by 8 bits it doesn<nowiki>’</nowiki>t actually change.
+
The shift-left (SHL) operation moves all the bits to the left by a certain amount. The maximum shift for a byte is 7, because when you shift by 8 bits it doesn’t actually change.
  
 
Example: SHL 51 by 1
 
Example: SHL 51 by 1
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify"|00110011 (51)
+
|align="justify"|00110011 (51)
 
|-
 
|-
 
|}
 
|}
  
01100110 (102)
+
01100110 (102)
  
 
Note that the bits are cycled around. Effectively, for each shift-left, you just take the left bit and put it at the end. So, if you do a shift-left of 3, you cut the first 3 bits from the value, and put it at the end.
 
Note that the bits are cycled around. Effectively, for each shift-left, you just take the left bit and put it at the end. So, if you do a shift-left of 3, you cut the first 3 bits from the value, and put it at the end.
Line 1,807: Line 1,807:
 
Example: SHL 51 by 3
 
Example: SHL 51 by 3
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify"|00110011 (51)
+
|align="justify"|00110011 (51)
 
|-
 
|-
 
|}
 
|}
  
10011001 (153)
+
10011001 (153)
  
 
====SHR====
 
====SHR====
Line 1,819: Line 1,819:
 
Example: SHR 51 by 1
 
Example: SHR 51 by 1
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify"|00110011 (51)
+
|align="justify"|00110011 (51)
 
|-
 
|-
 
|}
 
|}
Line 1,830: Line 1,830:
 
Example: SHR 51 by 3
 
Example: SHR 51 by 3
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify"|00110011 (51)
+
|align="justify"|00110011 (51)
 
|-
 
|-
 
|}
 
|}
Line 1,851: Line 1,851:
 
So, in a more practical sense, encryption techniques are applied to the data of an archive or file, converting it into something that is unreadable. The game is able to reverse this process to retrieve the actual file data - this is what we want to do too.
 
So, in a more practical sense, encryption techniques are applied to the data of an archive or file, converting it into something that is unreadable. The game is able to reverse this process to retrieve the actual file data - this is what we want to do too.
  
Encryption is a very old process, and it isn<nowiki>’</nowiki>t restricted to computer data - in fact you probably would have been doing encryption yourself when you were a child. One example is using lemon juice to write invisible messages on a piece of paper. Another example is to write a message using a code, such as the following:
+
Encryption is a very old process, and it isn’t restricted to computer data - in fact you probably would have been doing encryption yourself when you were a child. One example is using lemon juice to write invisible messages on a piece of paper. Another example is to write a message using a code, such as the following:
  
A=B, B=C, C=D, … X=Y, Y=Z, Z=A
+
A=B, B=C, C=D, X=Y, Y=Z, Z=A
  
 
In other words, instead of writing the work <font color="#800000">CAB</font>, you would write <font color="#800000">DBC</font>. In order to get the actual word back again, you just need to reverse the process:
 
In other words, instead of writing the work <font color="#800000">CAB</font>, you would write <font color="#800000">DBC</font>. In order to get the actual word back again, you just need to reverse the process:
  
A=Z, B=A, C=B, D=C, … Y=X, Z=Y
+
A=Z, B=A, C=B, D=C, Y=X, Z=Y
  
 
Which will give you the original <font color="#800000">CAB</font> message back again.
 
Which will give you the original <font color="#800000">CAB</font> message back again.
Line 1,866: Line 1,866:
 
When data is encrypted, the bytes will be changed so that they no longer resemble the original data. In other words, the data will appear as gibberish or junk. Therefore, it can be hard to locate encrypted data, as it will look like any normal file data.
 
When data is encrypted, the bytes will be changed so that they no longer resemble the original data. In other words, the data will appear as gibberish or junk. Therefore, it can be hard to locate encrypted data, as it will look like any normal file data.
  
The first thing to do is try and find a directory for the archive. If you cannot find the directory, it may be encrypted, compressed, or might not exist at all. If this is the case, you can<nowiki>’</nowiki>t really progress much further other than to experiment around yourself with some different encryption techniques incase you find something.
+
The first thing to do is try and find a directory for the archive. If you cannot find the directory, it may be encrypted, compressed, or might not exist at all. If this is the case, you can’t really progress much further other than to experiment around yourself with some different encryption techniques incase you find something.
  
In many archives that use encryption, you will be able to find a directory, but the filenames are encrypted. You can read the file offset and size fields, but the filename makes no sense. Filenames are usually encrypted to hinder people knowing what the files are used for, which makes them effectively useless. However, thankfully most filename encryptions can be broken easily enough, partly by exploiting the properties of the filename itself, which will be discussed further on. Encrypted filenames are identifiable because you can clearly see the directory, but there is a block of bytes in each directory entry that doesn<nowiki>’</nowiki>t make any sense.
+
In many archives that use encryption, you will be able to find a directory, but the filenames are encrypted. You can read the file offset and size fields, but the filename makes no sense. Filenames are usually encrypted to hinder people knowing what the files are used for, which makes them effectively useless. However, thankfully most filename encryptions can be broken easily enough, partly by exploiting the properties of the filename itself, which will be discussed further on. Encrypted filenames are identifiable because you can clearly see the directory, but there is a block of bytes in each directory entry that doesn’t make any sense.
  
The other main technique is to encrypt the actual file data. This can sometimes be a problem, but it is made easier if you know what the file data is supposed to represent. For example, if there are filenames in the archive, and you know the file you are looking at it supposed to be a <nowiki>*</nowiki>.wav file, then you would expect to see the header tag <font color="#800000">RIFF</font> at the start of the file data. If you don<nowiki>’</nowiki>t, maybe the file has been encrypted. If you do not know what the file data is supposed to be, you can<nowiki>’</nowiki>t tell easily whether encryption is used or not.
+
The other main technique is to encrypt the actual file data. This can sometimes be a problem, but it is made easier if you know what the file data is supposed to represent. For example, if there are filenames in the archive, and you know the file you are looking at it supposed to be a <nowiki>*</nowiki>.wav file, then you would expect to see the header tag <font color="#800000">RIFF</font> at the start of the file data. If you don’t, maybe the file has been encrypted. If you do not know what the file data is supposed to be, you can’t tell easily whether encryption is used or not.
  
 
As you can probably see so far - half the information needed to break encryption is knowing what the data is supposed to look like in its unencrypted form.
 
As you can probably see so far - half the information needed to break encryption is knowing what the data is supposed to look like in its unencrypted form.
Line 1,876: Line 1,876:
 
Some games can help with this process - if the game keeps a cache file of the resources it uses (such as in the game Half-Life 2 which has files called <nowiki>*</nowiki>.cache), you may be able to find the raw data for some of the files. If you are able to match a file in the unencrypted cache to a file in the archive, then all you need to do is find a way to transform the encrypted data into the unencrypted data.
 
Some games can help with this process - if the game keeps a cache file of the resources it uses (such as in the game Half-Life 2 which has files called <nowiki>*</nowiki>.cache), you may be able to find the raw data for some of the files. If you are able to match a file in the unencrypted cache to a file in the archive, then all you need to do is find a way to transform the encrypted data into the unencrypted data.
  
If you have the raw data for a file, but you don<nowiki>’</nowiki>t know what file in the archive it matches to, then you can find it relatively easily by searching through the archive directory for a file of the same size - there shouldn<nowiki>’</nowiki>t be too many.
+
If you have the raw data for a file, but you don’t know what file in the archive it matches to, then you can find it relatively easily by searching through the archive directory for a file of the same size - there shouldn’t be too many.
  
 
There are many other possible sources of unencrypted files:
 
There are many other possible sources of unencrypted files:
Line 1,895: Line 1,895:
  
 
{|border="0" cellspacing="2" width="100%"
 
{|border="0" cellspacing="2" width="100%"
|align = "justify"|01000011
+
|align="justify"|01000011
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|byte 67
+
|align="justify"|byte 67
 
|-
 
|-
|align = "justify"|00101110
+
|align="justify"|00101110
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|byte 46: "."
+
|align="justify"|byte 46: "."
 
|-
 
|-
|align = "justify"|01101101
+
|align="justify"|01101101
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|the XOR value is byte 109
+
|align="justify"|the XOR value is byte 109
 
|-
 
|-
 
|}
 
|}
  
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
 
|-
 
|-
 
|}
 
|}
Line 1,954: Line 1,954:
  
 
====How to break complex encryption====
 
====How to break complex encryption====
If you haven<nowiki>’</nowiki>t had any success thus far, it is possible that the encryption is more complicated. This means that it would probably be easier to find a reference to the encryption technique, rather than brute-forcing the encryption as we were above.
+
If you haven’t had any success thus far, it is possible that the encryption is more complicated. This means that it would probably be easier to find a reference to the encryption technique, rather than brute-forcing the encryption as we were above.
  
 
=====Looking for executable strings=====
 
=====Looking for executable strings=====
Line 1,969: Line 1,969:
  
 
====A worked example: Painkiller <nowiki>*</nowiki>.pak encryption====
 
====A worked example: Painkiller <nowiki>*</nowiki>.pak encryption====
Note that this is a fairly complex encryption, but isn<nowiki>’</nowiki>t too hard to determine.
+
Note that this is a fairly complex encryption, but isn’t too hard to determine.
  
 
When the developers of the game Painkiller first released a demo, fans quickly discovered that the game used adapted PKZip files to store the resources. However, the coders obviously did not want fans to have access to the resources, because in the second demo and the first retail version, they used a more "difficult to hack" method of storing resources.
 
When the developers of the game Painkiller first released a demo, fans quickly discovered that the game used adapted PKZip files to store the resources. However, the coders obviously did not want fans to have access to the resources, because in the second demo and the first retail version, they used a more "difficult to hack" method of storing resources.
  
While they used straight-forward fields such as the file size and file offset variables, they encrypted the filenames of the resources. In addition, they changed the compression method of the resources to Zlib compression. Without too much trouble, people had managed to work out the whole format, and could extract the resources, but they couldn<nowiki>’</nowiki>t decrypt the filenames.
+
While they used straight-forward fields such as the file size and file offset variables, they encrypted the filenames of the resources. In addition, they changed the compression method of the resources to Zlib compression. Without too much trouble, people had managed to work out the whole format, and could extract the resources, but they couldn’t decrypt the filenames.
  
 
In the archive <font color="#000080">scripts.pak</font> the first few encrypted filenames strings are as follows:
 
In the archive <font color="#000080">scripts.pak</font> the first few encrypted filenames strings are as follows:
Line 1,981: Line 1,981:
 
lOOO\A.<nowiki>[</nowiki>WVSJ/4j/&<nowiki> </nowiki>_
 
lOOO\A.<nowiki>[</nowiki>WVSJ/4j/&<nowiki> </nowiki>_
  
iJRRYD.IR\<nowiki>*</nowiki>&1/&<nowiki>’</nowiki>(a8=<nowiki><</nowiki>
+
iJRRYD.IR\<nowiki>*</nowiki>&1/&'(a8=<nowiki><</nowiki>
  
 
</font>
 
</font>
Line 1,995: Line 1,995:
 
In ASCII, symbols are mostly separated from the normal English characters, so we can assume that the symbols in our encryption will probably refer to a directory slash - either a <font color="#800000">'''\'''</font> or a <font color="#800000">'''/'''</font>.
 
In ASCII, symbols are mostly separated from the normal English characters, so we can assume that the symbols in our encryption will probably refer to a directory slash - either a <font color="#800000">'''\'''</font> or a <font color="#800000">'''/'''</font>.
  
Close examination of the other characters in the strings reveal that the last three characters of each string are preceded by a byte value in the 96<nowiki>+</nowiki> byte range. In our standard filename structure, the last three characters commonly represent the extension of the file, with the character before the extension always a <font color="#800000">'''.'''</font> , so it<nowiki>’</nowiki>s safe to assume the following structure of the encrypted strings:
+
Close examination of the other characters in the strings reveal that the last three characters of each string are preceded by a byte value in the 96<nowiki>+</nowiki> byte range. In our standard filename structure, the last three characters commonly represent the extension of the file, with the character before the extension always a <font color="#800000">'''.'''</font> , so it’s safe to assume the following structure of the encrypted strings:
  
 
<font color="#000080">'''<nowiki><</nowiki>'''</font><font color="#800000">Capital, lower-case</font><font color="#000080">'''<nowiki>></nowiki>\<nowiki><</nowiki>'''</font><font color="#800000">lower-case</font><font color="#000080">'''<nowiki>></nowiki>.<nowiki><</nowiki>'''</font><font color="#800000">lower-case</font><font color="#000080">'''<nowiki>></nowiki>'''</font>
 
<font color="#000080">'''<nowiki><</nowiki>'''</font><font color="#800000">Capital, lower-case</font><font color="#000080">'''<nowiki>></nowiki>\<nowiki><</nowiki>'''</font><font color="#800000">lower-case</font><font color="#000080">'''<nowiki>></nowiki>.<nowiki><</nowiki>'''</font><font color="#800000">lower-case</font><font color="#000080">'''<nowiki>></nowiki>'''</font>
Line 2,003: Line 2,003:
 
<font color="#000080">'''<nowiki><</nowiki>'''</font><font color="#800000">cLHLCB</font><font color="#000080">'''<nowiki>></nowiki>\<nowiki><</nowiki>'''</font><font color="#800000">P<nowiki>[</nowiki>\XIM</font><font color="#000080">'''<nowiki>></nowiki>.<nowiki><</nowiki>'''</font><font color="#800000">m,)</font><font color="#000080">'''<nowiki>></nowiki>'''</font>
 
<font color="#000080">'''<nowiki><</nowiki>'''</font><font color="#800000">cLHLCB</font><font color="#000080">'''<nowiki>></nowiki>\<nowiki><</nowiki>'''</font><font color="#800000">P<nowiki>[</nowiki>\XIM</font><font color="#000080">'''<nowiki>></nowiki>.<nowiki><</nowiki>'''</font><font color="#800000">m,)</font><font color="#000080">'''<nowiki>></nowiki>'''</font>
  
Well, this is very nice, but we still don<nowiki>’</nowiki>t know what <font color="#800000">cLHLCB</font> stands for. Let<nowiki>’</nowiki>s consider the usual XOR technique. We know that we have a <font color="#800000">'''\'''</font> or <font color="#800000">'''/'''</font>, and a <font color="#800000">'''.'''</font> in our strings. We can use this to find out the value used to XOR these bytes. For example, the <font color="#800000">'''. '''</font>character XOR with the equivalent character in our first filename gave us the byte value 67. The <font color="#800000">'''\'''</font> character XOR gave us the byte value 64, and the <font color="#800000">'''/'''</font> character gave us 51.
+
Well, this is very nice, but we still don’t know what <font color="#800000">cLHLCB</font> stands for. Let’s consider the usual XOR technique. We know that we have a <font color="#800000">'''\'''</font> or <font color="#800000">'''/'''</font>, and a <font color="#800000">'''.'''</font> in our strings. We can use this to find out the value used to XOR these bytes. For example, the <font color="#800000">'''. '''</font>character XOR with the equivalent character in our first filename gave us the byte value 67. The <font color="#800000">'''\'''</font> character XOR gave us the byte value 64, and the <font color="#800000">'''/'''</font> character gave us 51.
  
Now we don<nowiki>’</nowiki>t know whether the <font color="#800000">'''\'''</font> or the <font color="#800000">'''/'''</font> is used for directories, so we should look and see what we can determine. The distance between the slash and the dot in our first filename is 8 bytes. The difference in byte value between the <font color="#800000">'''.'''</font> and <font color="#800000">'''\'''</font> is 3 bytes, and between <font color="#800000">'''.'''</font> and <font color="#800000">'''/'''</font> is 16 bytes. Note that 8 = 16/2, so maybe it is as simple as adding two to the XOR value for each subsequent byte?
+
Now we don’t know whether the <font color="#800000">'''\'''</font> or the <font color="#800000">'''/'''</font> is used for directories, so we should look and see what we can determine. The distance between the slash and the dot in our first filename is 8 bytes. The difference in byte value between the <font color="#800000">'''.'''</font> and <font color="#800000">'''\'''</font> is 3 bytes, and between <font color="#800000">'''.'''</font> and <font color="#800000">'''/'''</font> is 16 bytes. Note that 8 = 16/2, so maybe it is as simple as adding two to the XOR value for each subsequent byte?
  
 
We can test this by starting from the forward slash and XORing the string characters to the last character in the string. Thus, we will use byte 51 for the forward slash, then use 53, 55, 57, 59, 61, 63, 65, 67 (our <font color="#800000">'''.'''</font>), 69, 71 and 73 respectively for the next characters:
 
We can test this by starting from the forward slash and XORing the string characters to the last character in the string. Thus, we will use byte 51 for the forward slash, then use 53, 55, 57, 59, 61, 63, 65, 67 (our <font color="#800000">'''.'''</font>), 69, 71 and 73 respectively for the next characters:
Line 2,021: Line 2,021:
 
lOOO\A.<nowiki>[</nowiki>WVSJ/4j/&<nowiki> </nowiki>_ = <font color="#800000">Decals/molotov.ini</font>
 
lOOO\A.<nowiki>[</nowiki>WVSJ/4j/&<nowiki> </nowiki>_ = <font color="#800000">Decals/molotov.ini</font>
  
iJRRYD.IR\<nowiki>*</nowiki>&1/&<nowiki>’</nowiki>(a8=<nowiki><</nowiki> = Decals/rockethole.ini
+
iJRRYD.IR\<nowiki>*</nowiki>&1/&'(a8=<nowiki><</nowiki> = Decals/rockethole.ini
  
 
Using this, the starting byte for the second filename is 40, and 45 for the third. We assume that the game can somehow calculate the starting points based on variables in the archive. When you look at the directory of the <nowiki>*</nowiki>.pak file, you will see file offsets, file sizes, and the length of the filename, among other stuff. Now compare the length of the filenames: the first is 18, the second also 18, and the third is 21. Compare this to the starting points, which were 39, 40, and 45. Notice how the first and second filename have equal length, and their starting point is only a difference of 1.
 
Using this, the starting byte for the second filename is 40, and 45 for the third. We assume that the game can somehow calculate the starting points based on variables in the archive. When you look at the directory of the <nowiki>*</nowiki>.pak file, you will see file offsets, file sizes, and the length of the filename, among other stuff. Now compare the length of the filenames: the first is 18, the second also 18, and the third is 21. Compare this to the starting points, which were 39, 40, and 45. Notice how the first and second filename have equal length, and their starting point is only a difference of 1.
  
To start with, let<nowiki>’</nowiki>s propose that the way to determine the start point is somehow related to the length of the filename. Filename 1 and 2 both have the same length, so in theory they should end up with the same starting point, however the second filename has a starting point 1 higher than the first filename.
+
To start with, let’s propose that the way to determine the start point is somehow related to the length of the filename. Filename 1 and 2 both have the same length, so in theory they should end up with the same starting point, however the second filename has a starting point 1 higher than the first filename.
  
 
Well, perhaps the method will take into consideration the position of the resource in the file (the first one is file 1, the second file 2 and so forth). When the starting point would be calculated, the final value could be incremented with the position in the file. This way the difference between the starting point of filename 1 and 2, having the same length, would indeed be 1. This then implies that the value used to calculate the starting point for the first string would actually be 39-1=38, the second 40-2=38 and the third 45-3=42.
 
Well, perhaps the method will take into consideration the position of the resource in the file (the first one is file 1, the second file 2 and so forth). When the starting point would be calculated, the final value could be incremented with the position in the file. This way the difference between the starting point of filename 1 and 2, having the same length, would indeed be 1. This then implies that the value used to calculate the starting point for the first string would actually be 39-1=38, the second 40-2=38 and the third 45-3=42.
  
Assuming the above is correct, then how can we obtain the value of 38 for the first string? This is not easy, but we just try a number of ideas. The length of the first filename is 18. If we do a SHL of this number we get 36. This is rather close to 38, isn<nowiki>’</nowiki>t it? How about the third filename? A SHL of this gives 42. This is exactly the starting point value of the third filename.
+
Assuming the above is correct, then how can we obtain the value of 38 for the first string? This is not easy, but we just try a number of ideas. The length of the first filename is 18. If we do a SHL of this number we get 36. This is rather close to 38, isn’t it? How about the third filename? A SHL of this gives 42. This is exactly the starting point value of the third filename.
  
Thus, if we calculate it this way for the first and second filenames, we get a value that is 2 lower than what is should be, and for the third the difference between our calculation and what it should be is 0. Perhaps we are mistaken, and the method is different? Well, we are trying to understand, and obviously we haven<nowiki>’</nowiki>t cracked it completely. We will still stay on track though and keep the shift left as it is rather close to the actual starting point value.
+
Thus, if we calculate it this way for the first and second filenames, we get a value that is 2 lower than what is should be, and for the third the difference between our calculation and what it should be is 0. Perhaps we are mistaken, and the method is different? Well, we are trying to understand, and obviously we haven’t cracked it completely. We will still stay on track though and keep the shift left as it is rather close to the actual starting point value.
  
More information is needed at times like this, and it is advised to apply your proposed methods on many cases of whatever is encrypted. In our case, we must check more strings to map potential differences in the SHL values. We will not show it here, but we<nowiki>’</nowiki>ll present the number of possibilities that you will get if you do so. We find that our SHL of the length variable differs from the starting point value in this range:
+
More information is needed at times like this, and it is advised to apply your proposed methods on many cases of whatever is encrypted. In our case, we must check more strings to map potential differences in the SHL values. We will not show it here, but we’ll present the number of possibilities that you will get if you do so. We find that our SHL of the length variable differs from the starting point value in this range:
  
 
SHL(length) - starting point = <nowiki>{</nowiki>-2, -1, 0, 1, 2<nowiki>}</nowiki>
 
SHL(length) - starting point = <nowiki>{</nowiki>-2, -1, 0, 1, 2<nowiki>}</nowiki>
Line 2,041: Line 2,041:
 
Apparently, the encryption process has some way of telling when to add or subtract these values from the result of the SHL operation, as if looking them up from a table. How would this table look like, and how would it know where to look in the table? The only way to get a hint of this process is by examination of multiple strings and comparing the starting points with the size variable, as we will assume that the length is also needed to look up the variable from the unknown table (as filename 1 and filename 2 only have the length in common, this shows that the encryption uses only this variable to encrypt).
 
Apparently, the encryption process has some way of telling when to add or subtract these values from the result of the SHL operation, as if looking them up from a table. How would this table look like, and how would it know where to look in the table? The only way to get a hint of this process is by examination of multiple strings and comparing the starting points with the size variable, as we will assume that the length is also needed to look up the variable from the unknown table (as filename 1 and filename 2 only have the length in common, this shows that the encryption uses only this variable to encrypt).
  
So, make a table from a size variable of 0 upwards. Look at the strings and find the starting point, write down the range value it used (-2 or -1 and so forth). Well, you won<nowiki>’</nowiki>t find filenames of length 0, but just fill in those that you do find.
+
So, make a table from a size variable of 0 upwards. Look at the strings and find the starting point, write down the range value it used (-2 or -1 and so forth). Well, you won’t find filenames of length 0, but just fill in those that you do find.
  
 
If you do this, you will discover the following table:
 
If you do this, you will discover the following table:
  
 
{|border="2" cellspacing="0" cellpadding="4" width="26%" align="center"
 
{|border="2" cellspacing="0" cellpadding="4" width="26%" align="center"
|align = "center" bgcolor = "#E6E6E6"|<font color="#000080">Size</font>
+
|align="center" bgcolor="#E6E6E6"|<font color="#000080">Size</font>
|align = "center" bgcolor = "#E6E6E6"|<font color="#000080">Code</font>
+
|align="center" bgcolor="#E6E6E6"|<font color="#000080">Code</font>
 
|-
 
|-
|align = "center"|0
+
|align="center"|0
|align = "center"|<nowiki>-</nowiki>2
+
|align="center"|<nowiki>-</nowiki>2
 
|-
 
|-
|align = "center"|1
+
|align="center"|1
|align = "center"|<nowiki>-</nowiki>1
+
|align="center"|<nowiki>-</nowiki>1
 
|-
 
|-
|align = "center"|2
+
|align="center"|2
|align = "center"|0
+
|align="center"|0
 
|-
 
|-
|align = "center"|3
+
|align="center"|3
|align = "center"|1
+
|align="center"|1
 
|-
 
|-
|align = "center"|4
+
|align="center"|4
|align = "center"|2
+
|align="center"|2
 
|-
 
|-
|align = "center"|5
+
|align="center"|5
|align = "center"|<nowiki>-</nowiki>2
+
|align="center"|<nowiki>-</nowiki>2
 
|-
 
|-
|align = "center"|6
+
|align="center"|6
|align = "center"|<nowiki>-</nowiki>1
+
|align="center"|<nowiki>-</nowiki>1
 
|-
 
|-
|align = "center"|7
+
|align="center"|7
|align = "center"|0
+
|align="center"|0
 
|-
 
|-
|align = "center"|8
+
|align="center"|8
|align = "center"|1
+
|align="center"|1
 
|-
 
|-
|align = "center"|9
+
|align="center"|9
|align = "center"|2
+
|align="center"|2
 
|-
 
|-
|align = "center"|10
+
|align="center"|10
|align = "center"|<nowiki>-</nowiki>2
+
|align="center"|<nowiki>-</nowiki>2
 
|-
 
|-
|align = "center"|11
+
|align="center"|11
|align = "center"|<nowiki>-</nowiki>1
+
|align="center"|<nowiki>-</nowiki>1
 
|-
 
|-
|align = "center"|12
+
|align="center"|12
|align = "center"|0
+
|align="center"|0
 
|-
 
|-
|align = "center"|13
+
|align="center"|13
|align = "center"|1
+
|align="center"|1
 
|-
 
|-
|align = "center"|14
+
|align="center"|14
|align = "center"|2
+
|align="center"|2
 
|-
 
|-
|align = "center"|15
+
|align="center"|15
|align = "center"|<nowiki>-</nowiki>2
+
|align="center"|<nowiki>-</nowiki>2
 
|-
 
|-
|align = "center"|16
+
|align="center"|16
|align = "center"|<nowiki>-</nowiki>1
+
|align="center"|<nowiki>-</nowiki>1
 
|-
 
|-
|align = "center"|17
+
|align="center"|17
|align = "center"|0
+
|align="center"|0
 
|-
 
|-
|align = "center"|18
+
|align="center"|18
|align = "center"|1
+
|align="center"|1
 
|-
 
|-
|align = "center"|19
+
|align="center"|19
|align = "center"|2
+
|align="center"|2
 
|-
 
|-
|align = "center"|20
+
|align="center"|20
|align = "center"|<nowiki>-</nowiki>2
+
|align="center"|<nowiki>-</nowiki>2
 
|-
 
|-
|align = "center"|21
+
|align="center"|21
|align = "center"|<nowiki>-</nowiki>1
+
|align="center"|<nowiki>-</nowiki>1
 
|-
 
|-
 
|}<br clear="all">
 
|}<br clear="all">
Line 2,119: Line 2,119:
 
and so forth.
 
and so forth.
  
So you can see a nice pattern here. Let<nowiki>’</nowiki>s take the first string. It has a length of 18. That means the code will be 1. The starting point will therefore be calculated like this:
+
So you can see a nice pattern here. Let’s take the first string. It has a length of 18. That means the code will be 1. The starting point will therefore be calculated like this:
  
 
{|border="0" cellspacing="2" width="100%"
 
{|border="0" cellspacing="2" width="100%"
|align = "justify"|First file:
+
|align="justify"|First file:
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|SHL(18) <nowiki>+</nowiki> 1 (from file 1) <nowiki>+</nowiki> 1 (Code) = 39
+
|align="justify"|SHL(18) <nowiki>+</nowiki> 1 (from file 1) <nowiki>+</nowiki> 1 (Code) = 39
 
|-
 
|-
|align = "justify" colspan = "2"|Second file:
+
|align="justify" colspan="2"|Second file:
|align = "justify"|SHL(18) <nowiki>+</nowiki> 2 (from file 1) <nowiki>+</nowiki> 1 (Code) = 40
+
|align="justify"|SHL(18) <nowiki>+</nowiki> 2 (from file 1) <nowiki>+</nowiki> 1 (Code) = 40
 
|-
 
|-
|align = "justify"|Third file:
+
|align="justify"|Third file:
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|SHL(21) <nowiki>+</nowiki> 3 (from file 1) <nowiki>+</nowiki> -1 (Code) = 45
+
|align="justify"|SHL(21) <nowiki>+</nowiki> 3 (from file 1) <nowiki>+</nowiki> -1 (Code) = 45
 
|-
 
|-
 
|}
 
|}
Line 2,137: Line 2,137:
 
These are the XOR values that will be used on the first character of the filename. For each subsequent character this value will be incremented by 2.
 
These are the XOR values that will be used on the first character of the filename. For each subsequent character this value will be incremented by 2.
  
Encryption methods are with many, but so are your brain cells. The Painkiller <nowiki>*</nowiki>.pak filename encryption is just one of many ways to encrypt, and there<nowiki>’</nowiki>s no universal tool or process to decrypt all of them. As the uncovering of this encryption method should show, there<nowiki>’</nowiki>s a lot of guessing and second-guessing needed to solve the puzzle, besides a logic mind. You should train yourself in recognizing logical patterns; think along lines of file structures, bytes and bits. By using a pen and paper you can write down notes, compare things more easily, write down binary values, and try different logical methods to get where you need to be.
+
Encryption methods are with many, but so are your brain cells. The Painkiller <nowiki>*</nowiki>.pak filename encryption is just one of many ways to encrypt, and there’s no universal tool or process to decrypt all of them. As the uncovering of this encryption method should show, there’s a lot of guessing and second-guessing needed to solve the puzzle, besides a logic mind. You should train yourself in recognizing logical patterns; think along lines of file structures, bytes and bits. By using a pen and paper you can write down notes, compare things more easily, write down binary values, and try different logical methods to get where you need to be.
  
 
===Compression===
 
===Compression===
Line 2,152: Line 2,152:
 
The vast majority of compressed files in archives use <font color="#FF6600">ZLib</font>. This compression method has many advantages, such as high compression rates, fast decompression, free to use, and open source.
 
The vast majority of compressed files in archives use <font color="#FF6600">ZLib</font>. This compression method has many advantages, such as high compression rates, fast decompression, free to use, and open source.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|More information about <font color="#FF6600">ZLib</font>, including programs that can be used to read or write ZLib-compressed files, can be found at <font color="#0000FF"><u>http://www.gzip.org/zlib/</u></font>
+
|align="justify" bgcolor="#E6E6E6"|More information about <font color="#FF6600">ZLib</font>, including programs that can be used to read or write ZLib-compressed files, can be found at <font color="#0000FF"><u>http://www.gzip.org/zlib/</u></font>
 
|-
 
|-
 
|}
 
|}
Line 2,162: Line 2,162:
 
Many games nowadays, particularly games that encourage a degree of modding, use the standard <font color="#FF6600">PKZip</font> compression to compress individual files, or just pack all their files into an actual <nowiki>*</nowiki>.zip file. However, these games will usually change the extension to something other than <nowiki>*</nowiki>.zip - a common extension change it to <nowiki>*</nowiki>.pk3. A PKZip archive can be detected by the header tag <font color="#800000">PK</font>, which occurs at the beginning of the archive, at the beginning of each file, and in the end directory if it exists.
 
Many games nowadays, particularly games that encourage a degree of modding, use the standard <font color="#FF6600">PKZip</font> compression to compress individual files, or just pack all their files into an actual <nowiki>*</nowiki>.zip file. However, these games will usually change the extension to something other than <nowiki>*</nowiki>.zip - a common extension change it to <nowiki>*</nowiki>.pk3. A PKZip archive can be detected by the header tag <font color="#800000">PK</font>, which occurs at the beginning of the archive, at the beginning of each file, and in the end directory if it exists.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|Information about the <font color="#FF6600">PKZip</font> format, including programs and specifications, can be found at <font color="#0000FF"><u>http://www.pkware.com/</u></font>.
+
|align="justify" bgcolor="#E6E6E6"|Information about the <font color="#FF6600">PKZip</font> format, including programs and specifications, can be found at <font color="#0000FF"><u>http://www.pkware.com/</u></font>.
 
|-
 
|-
 
|}
 
|}
  
Some games also use PKZip compression, due to it being a standard and successful compression format, but still don<nowiki>’</nowiki>t want people to access the files - a technique which is being used in a few games is to slightly modify a <nowiki>*</nowiki>.zip archive so that it isn<nowiki>’</nowiki>t openable by normal zip programs. One method is to encrypt the entire archive, usually using a single-value XOR (as discussed earlier), or to change the <font color="#800000">PK</font> header into a different header like <font color="#800000">QL</font>.
+
Some games also use PKZip compression, due to it being a standard and successful compression format, but still don’t want people to access the files - a technique which is being used in a few games is to slightly modify a <nowiki>*</nowiki>.zip archive so that it isn’t openable by normal zip programs. One method is to encrypt the entire archive, usually using a single-value XOR (as discussed earlier), or to change the <font color="#800000">PK</font> header into a different header like <font color="#800000">QL</font>.
  
 
To determine whether an archive is PKZip compatible, it is usually quickest to change the extension to <nowiki>*</nowiki>.zip and try to open it using a standard zip program like <font color="#FF6600">WinZip</font>.
 
To determine whether an archive is PKZip compatible, it is usually quickest to change the extension to <nowiki>*</nowiki>.zip and try to open it using a standard zip program like <font color="#FF6600">WinZip</font>.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|The <font color="#FF6600">WinZip</font> program is a very common implementation zip reader, and can be used for free from <font color="#0000FF"><u>http://www.winzip.com</u></font>.
+
|align="justify" bgcolor="#E6E6E6"|The <font color="#FF6600">WinZip</font> program is a very common implementation zip reader, and can be used for free from <font color="#0000FF"><u>http://www.winzip.com</u></font>.
 
|-
 
|-
 
|}
 
|}
Line 2,179: Line 2,179:
 
Although not very popular at the moment, some games try to increase compression rates by using other semi-standard compression types. Some of the ones that have been used include generic TAR archives, and archives using the <font color="#FF6600">WinRAR</font> library. Expect to see some of these compression archives to appear in upcoming games.
 
Although not very popular at the moment, some games try to increase compression rates by using other semi-standard compression types. Some of the ones that have been used include generic TAR archives, and archives using the <font color="#FF6600">WinRAR</font> library. Expect to see some of these compression archives to appear in upcoming games.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|<font color="#FF6600">WinRAR</font> is similar to the zip compression methodology, and achieves similar compression ratios. Information on the RAR format, and the main program for reading these archives, can be found at <font color="#0000FF"><u>http://www.win-rar.com/</u></font>.
+
|align="justify" bgcolor="#E6E6E6"|<font color="#FF6600">WinRAR</font> is similar to the zip compression methodology, and achieves similar compression ratios. Information on the RAR format, and the main program for reading these archives, can be found at <font color="#0000FF"><u>http://www.win-rar.com/</u></font>.
 
|-
 
|-
 
|}
 
|}
Line 2,191: Line 2,191:
 
If you are lucky, the custom compression may simply be a <font color="#008000">''RLE''</font> variation, which is thankfully relatively easy to determine.
 
If you are lucky, the custom compression may simply be a <font color="#008000">''RLE''</font> variation, which is thankfully relatively easy to determine.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|<font color="#008000">RLE</font> stands for Run-Length Encoding, and is basically a way to compress a file by removing repetitions. This technique can sometimes be successful, particularly on plain-text files. This compression is also commonly used for image files, such as BMP images.
+
|align="justify" bgcolor="#E6E6E6"|<font color="#008000">RLE</font> stands for Run-Length Encoding, and is basically a way to compress a file by removing repetitions. This technique can sometimes be successful, particularly on plain-text files. This compression is also commonly used for image files, such as BMP images.
 
|-
 
|-
 
|}
 
|}
Line 2,202: Line 2,202:
 
It is pretty obvious what the string is supposed to say, and the symbols amongst the letters say that they are some kind of <font color="#008000">''control character''</font>, indicating what to do next. In the example above, the <font color="#000080"><nowiki>^</nowiki></font> symbol would mean <font color="#800000">read the next 16 characters</font> normally, the <font color="#000080">$ </font>would mean <font color="#800000">read the next 9 characters</font>, and the <font color="#000080">(</font> is <font color="#800000">read the next 3 characters</font>.
 
It is pretty obvious what the string is supposed to say, and the symbols amongst the letters say that they are some kind of <font color="#008000">''control character''</font>, indicating what to do next. In the example above, the <font color="#000080"><nowiki>^</nowiki></font> symbol would mean <font color="#800000">read the next 16 characters</font> normally, the <font color="#000080">$ </font>would mean <font color="#800000">read the next 9 characters</font>, and the <font color="#000080">(</font> is <font color="#800000">read the next 3 characters</font>.
  
{|cellspacing="0" cellpadding = "0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
+
{|cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-collapse:collapse" width="100%"
|align = "justify" bgcolor = "#E6E6E6"|A <font color="#008000">control character</font> is a (usually 1) byte that tells the decompression function what to do next. Some common control character meanings are:
+
|align="justify" bgcolor="#E6E6E6"|A <font color="#008000">control character</font> is a (usually 1) byte that tells the decompression function what to do next. Some common control character meanings are:
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|'''-''' read the next X bytes
+
|align="justify" bgcolor="#E6E6E6"|'''-''' read the next X bytes
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|'''-''' repeat the next X bytes N times
+
|align="justify" bgcolor="#E6E6E6"|'''-''' repeat the next X bytes N times
 
|-
 
|-
|align = "justify" bgcolor = "#E6E6E6"|'''- '''go back to a previous position, and copy X bytes
+
|align="justify" bgcolor="#E6E6E6"|'''- '''go back to a previous position, and copy X bytes
 
|-
 
|-
 
|}
 
|}
  
Obviously, the example above didn<nowiki>’</nowiki>t compress the file much, in fact it actually made it longer. An example which would be much better is that below:
+
Obviously, the example above didn’t compress the file much, in fact it actually made it longer. An example which would be much better is that below:
  
 
<font color="#800000">I know why it is </font><font color="#000080">$&</font><font color="#800000">very hot today. Because</font><font color="#000080"> <nowiki>*</nowiki>(</font><font color="#800000"> summer!</font>
 
<font color="#800000">I know why it is </font><font color="#000080">$&</font><font color="#800000">very hot today. Because</font><font color="#000080"> <nowiki>*</nowiki>(</font><font color="#800000"> summer!</font>
Line 2,223: Line 2,223:
 
In our example, we would first notice that the control characters come in groups of 2, which probably mean that the first byte tells us what to do, and the second byte would say some kind of variable related to the function.
 
In our example, we would first notice that the control characters come in groups of 2, which probably mean that the first byte tells us what to do, and the second byte would say some kind of variable related to the function.
  
The first control character we come across is <font color="#000080">$&</font>. In practice, the control characters can be anything, and any number of bytes, so don<nowiki>’</nowiki>t assume that this example is totally accurate - rather use it as a sample insight into the possibilities.
+
The first control character we come across is <font color="#000080">$&</font>. In practice, the control characters can be anything, and any number of bytes, so don’t assume that this example is totally accurate - rather use it as a sample insight into the possibilities.
  
 
In our example, the character <font color="#000080">$</font> means to <font color="#993300">repeat </font>something, and the <font color="#000080">&</font> character would say 2 things: the first 4 bits say the <font color="#993300">next 5 characters are to be repeated</font>, and the last 4 bits say to <font color="#993300">repeat 2 times</font>. This brings up an important thing to note when dealing with this type of compression: often you need to look at the bit level rather than the byte level.
 
In our example, the character <font color="#000080">$</font> means to <font color="#993300">repeat </font>something, and the <font color="#000080">&</font> character would say 2 things: the first 4 bits say the <font color="#993300">next 5 characters are to be repeated</font>, and the last 4 bits say to <font color="#993300">repeat 2 times</font>. This brings up an important thing to note when dealing with this type of compression: often you need to look at the bit level rather than the byte level.
Line 2,239: Line 2,239:
 
=====Looking for executable strings=====
 
=====Looking for executable strings=====
  
As with encryption, searching an executable file for strings can be really helpful, even if the compression is custom. For example, Huffman tables are used in many compression techniques, and as such there is usually some functions that have Huffman written in them. If you fund something like LZHUncompress, or a string that mentions an LZ variant, you should look around on the internet for some LZ decompressors to see if you can find an exact match.
+
As with encryption, searching an executable file for strings can be really helpful, even if the compression is custom. For example, Huffman tables are used in many compression techniques, and as such there is usually some functions that have Huffman written in them. If you find something like LZHUncompress, or a string that mentions an LZ variant, you should look around on the internet for some LZ decompressors to see if you can find an exact match.
  
 
You could also simply delete or rename an archive and then try to start the game - the program might display an error message telling you the compression type. Also check readme files and in-game credits, as they will often list the products that are used in the game, such as Bink Video Compression.
 
You could also simply delete or rename an archive and then try to start the game - the program might display an error message telling you the compression type. Also check readme files and in-game credits, as they will often list the products that are used in the game, such as Bink Video Compression.
Line 2,245: Line 2,245:
 
=====Reverse-engineering the compression method=====
 
=====Reverse-engineering the compression method=====
  
If the compression is custom, then you have a real problem. Compression is much more complex in comparison to encryption, and thus not many people have much success trying to decompress these files. The main and most successful method is to reverse-engineer the game executables to try and locate the compression function (using a disassembler). If this can be located, most people will just cat and paste the function into their own programs, which will allow decompression but unfortunately rarely will be found a compression function. This would therefore require someone who can read the decompression function in assembly language, convert it into a usable specification, and develop a compression algorithm for it - by no means an easy feat.
+
If the compression is custom, then you have a real problem. Compression is much more complex in comparison to encryption, and thus not many people have much success trying to decompress these files. The main and most successful method is to reverse-engineer the game executables to try and locate the compression function (using a disassembler). If this can be located, most people will just cut and paste the function into their own programs, which will allow decompression but unfortunately rarely will be found a compression function. This would therefore require someone who can read the decompression function in assembly language, convert it into a usable specification, and develop a compression algorithm for it - by no means an easy feat.
  
 
==Worked Examples==
 
==Worked Examples==
In this section we will go through the process of cracking a format step by step, from opening it for the first time in a hex editor, to the final format presentation. To do this, we will cover some relatively easy formats. Let<nowiki>’</nowiki>s start off immediately, because the sooner you get to grips with it, the sooner you can start cracking your own!
+
In this section we will go through the process of cracking a format step by step, from opening it for the first time in a hex editor, to the final format presentation. To do this, we will cover some relatively easy formats. Let’s start off immediately, because the sooner you get to grips with it, the sooner you can start cracking your own!
  
 
===Quake <nowiki>*</nowiki>.PAK===
 
===Quake <nowiki>*</nowiki>.PAK===
Line 2,254: Line 2,254:
  
 
Ad:\downloads\wikimages\Guide_To_Exploring_File_Formats_-_011_-_03.png jp
 
Ad:\downloads\wikimages\Guide_To_Exploring_File_Formats_-_011_-_03.png jp
[[Image:## Error Converting ##]] [[Image:Guide_To_Exploring_File_Formats_-_011_-_03.png]]
+
[[File:## Error Converting ##]] [[File:Guide_To_Exploring_File_Formats_-_011_-_03.png]]
  
 
<font color="#000080">'''Figure 8.1a: Start of the Quake 2 pak0.pak file in Hex Workshop.'''</font>
 
<font color="#000080">'''Figure 8.1a: Start of the Quake 2 pak0.pak file in Hex Workshop.'''</font>
Line 2,273: Line 2,273:
 
=====Is there a header tag?=====
 
=====Is there a header tag?=====
  
In this case, there is a header tag, which says <font color="#800000">PACK</font>. This is how we know that Quake and Quake 2 both use the same archive format: they both have the same header tag. However, don<nowiki>’</nowiki>t assume that just because the header tags are identical, that they are the same format. For example, there are other games that have PACK as their header, and even use <nowiki>*</nowiki>.pak as their filename, but they are different to the PACK format here.
+
In this case, there is a header tag, which says <font color="#800000">PACK</font>. This is how we know that Quake and Quake 2 both use the same archive format: they both have the same header tag. However, don’t assume that just because the header tags are identical, that they are the same format. For example, there are other games that have PACK as their header, and even use <nowiki>*</nowiki>.pak as their filename, but they are different to the PACK format here.
  
 
=====Can you see any filenames?=====
 
=====Can you see any filenames?=====
  
Looking at the start of the archive, we can<nowiki>’</nowiki>t see anything all that useful, especially filenames. Therefore, lets move to the end of the archive - maybe we can find some filenames there.
+
Looking at the start of the archive, we can’t see anything all that useful, especially filenames. Therefore, lets move to the end of the archive - maybe we can find some filenames there.
  
 
Nad:\downloads\wikimages\Guide_To_Exploring_File_Formats_-_011_-_04.png jp
 
Nad:\downloads\wikimages\Guide_To_Exploring_File_Formats_-_011_-_04.png jp
[[Image:## Error Converting ##]] [[Image:Guide_To_Exploring_File_Formats_-_011_-_04.png]]
+
[[File:## Error Converting ##]] [[File:Guide_To_Exploring_File_Formats_-_011_-_04.png]]
  
<font color="#000080">'''Figure 8.1.1.2a: A snippet from the end of Quake 2<nowiki>’</nowiki>s pak0.pak file.'''</font>
+
<font color="#000080">'''Figure 8.1.1.2a: A snippet from the end of Quake 2’s pak0.pak file.'''</font>
  
 
Success, we have located several filename strings. The text <font color="#800000">models/weapons/v_machn/skin.pcx</font> is quite obviously the name of a file, in this case it is an image.
 
Success, we have located several filename strings. The text <font color="#800000">models/weapons/v_machn/skin.pcx</font> is quite obviously the name of a file, in this case it is an image.
Line 2,300: Line 2,300:
  
 
Nad:\downloads\wikimages\Guide_To_Exploring_File_Formats_-_011_-_05.png jp
 
Nad:\downloads\wikimages\Guide_To_Exploring_File_Formats_-_011_-_05.png jp
[[Image:## Error Converting ##]] [[Image:Guide_To_Exploring_File_Formats_-_011_-_05.png]]
+
[[File:## Error Converting ##]] [[File:Guide_To_Exploring_File_Formats_-_011_-_05.png]]
  
 
<font color="#000080">'''Figure 8.1.2.1a: A single directory entry'''</font>
 
<font color="#000080">'''Figure 8.1.2.1a: A single directory entry'''</font>
Line 2,324: Line 2,324:
  
 
Nad:\downloads\wikimages\Guide_To_Exploring_File_Formats_-_011_-_06.png jp
 
Nad:\downloads\wikimages\Guide_To_Exploring_File_Formats_-_011_-_06.png jp
[[Image:## Error Converting ##]] [[Image:Guide_To_Exploring_File_Formats_-_011_-_06.png]]
+
[[File:## Error Converting ##]] [[File:Guide_To_Exploring_File_Formats_-_011_-_06.png]]
  
 
<font color="#000080">'''Figure 8.1.3a: The first filename in the directory, which should be close to the start of the directory.'''</font>
 
<font color="#000080">'''Figure 8.1.3a: The first filename in the directory, which should be close to the start of the directory.'''</font>
Line 2,334: Line 2,334:
  
 
Nad:\downloads\wikimages\Guide_To_Exploring_File_Formats_-_011_-_07.png jp
 
Nad:\downloads\wikimages\Guide_To_Exploring_File_Formats_-_011_-_07.png jp
[[Image:## Error Converting ##]] [[Image:Guide_To_Exploring_File_Formats_-_011_-_07.png]]
+
[[File:## Error Converting ##]] [[File:Guide_To_Exploring_File_Formats_-_011_-_07.png]]
  
 
<font color="#000080">'''Figure 8.1.4a: At the start of the archive. The cursor is at offset 4. The Data Inspector show the interpreted values at this location.'''</font>
 
<font color="#000080">'''Figure 8.1.4a: At the start of the archive. The cursor is at offset 4. The Data Inspector show the interpreted values at this location.'''</font>
Line 2,347: Line 2,347:
  
 
====The final result====
 
====The final result====
When we put all this information together, these are the final specifications for this archive format. Now all that<nowiki>’</nowiki>s left is to write a program to read and/or write these archives.
+
When we put all this information together, these are the final specifications for this archive format. Now all that’s left is to write a program to read and/or write these archives.
  
 
The format is a Directory archive, which is one of our patterns identified in an earlier chapter. The values for the archive in our example are shown in <font color="#008000">green</font>. Also note the value <font color="#008000">1106</font> - there are 1106 entries in the directory, and 1106 file data in the archive.
 
The format is a Directory archive, which is one of our patterns identified in an earlier chapter. The values for the archive in our example are shown in <font color="#008000">green</font>. Also note the value <font color="#008000">1106</font> - there are 1106 entries in the directory, and 1106 file data in the archive.
  
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
 
{|border="2" cellspacing="0" cellpadding="4" width="90%"
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Archive Header</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Archive Header</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" colspan = "2"|4 - Header Tag (String) <font color="#008000">PACK</font><br>4 - Directory Offset 49880538<br>4 - Directory Length 70784
+
|align="justify" colspan="2"|4 - Header Tag (String) <font color="#008000">PACK</font><br>4 - Directory Offset 49880538<br>4 - Directory Length 70784
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">File Data</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">File Data</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data <font color="#008000"> the data for the file env/unit1_rt.pcx</font>
+
|align="justify"|X - File Data <font color="#008000"> the data for the file env/unit1_rt.pcx</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Data </font><font color="#008000">1106</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Data </font><font color="#008000">1106</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|X - File Data
+
|align="justify"|X - File Data
 
|-
 
|-
|align = "justify" colspan = "3"|&nbsp;
+
|align="justify" colspan="3"|&nbsp;
 
|-
 
|-
|align = "justify" bgcolor = "#D9D9D9" colspan = "3"|<font color="#000080">Directory</font>
+
|align="justify" bgcolor="#D9D9D9" colspan="3"|<font color="#000080">Directory</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 1</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 1</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|56 - Filename (null terminated) <font color="#008000">env/unit1_rt.pcx</font><br>4 - File Offset 12<br>4 - File Size 23098
+
|align="justify"|56 - Filename (null terminated) <font color="#008000">env/unit1_rt.pcx</font><br>4 - File Offset 12<br>4 - File Size 23098
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry 2</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry 2</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|56 - Filename (null terminated)<br>4 - File Offset<br>4 - File Size
+
|align="justify"|56 - Filename (null terminated)<br>4 - File Offset<br>4 - File Size
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">…</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000"></font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify" bgcolor = "#E6E6E6" colspan = "2"|<font color="#800000">File Entry </font><font color="#008000">1106</font>
+
|align="justify" bgcolor="#E6E6E6" colspan="2"|<font color="#800000">File Entry </font><font color="#008000">1106</font>
 
|-
 
|-
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|&nbsp;
+
|align="justify"|&nbsp;
|align = "justify"|56 - Filename (null terminated)<br>4 - File Offset<br>4 - File Size
+
|align="justify"|56 - Filename (null terminated)<br>4 - File Offset<br>4 - File Size
 
|-
 
|-
 
|}
 
|}
Line 2,419: Line 2,419:
 
==Appendix==
 
==Appendix==
 
===Binary  Byte Number Table===
 
===Binary  Byte Number Table===
{|border="2" cellspacing="0" cellpadding="4" width="62%" align="center"
+
{| class="wikitable" style="margin: auto; text-align: center;"
|align = "center"|<font size = "1">Bit 7 (2<sup>7</sup>)</font>
+
|-
|align = "center"|<font size = "1">Bit 6 (2<sup>6</sup>)</font>
+
! scope="col" | Value
|align = "center"|<font size = "1">Bit 5 (2<sup>5</sup>)</font>
+
! scope="col" | Bit 7 (2<sup>7</sup>)
|align = "center"|<font size = "1">Bit 4 (2<sup>4</sup>)</font>
+
! scope="col" | Bit 6 (2<sup>6</sup>)
|align = "center"|<font size = "1">Bit 3 (2<sup>3</sup>)</font>
+
! scope="col" | Bit 5 (2<sup>5</sup>)
|align = "center"|<font size = "1">Bit 2 (2<sup>2</sup>)</font>
+
! scope="col" | Bit 4 (2<sup>4</sup>)
|align = "center"|<font size = "1">Bit 1 (2<sup>1</sup>)</font>
+
! scope="col" | Bit 3 (2<sup>3</sup>)
|align = "center"|<font size = "1">Bit 0 (2<sup>0</sup>)</font>
+
! scope="col" | Bit 2 (2<sup>2</sup>)
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">Value</font>
+
! scope="col" | Bit 1 (2<sup>1</sup>)
 +
! scope="col" | Bit 0 (2<sup>0</sup>)
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 0
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">0</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 1
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 0 || 0 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">1</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 2
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 0 || 0 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">2</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 3
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 0 || 0 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">3</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 4
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 0 || 1 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">4</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 5
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 0 || 1 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">5</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 6
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 0 || 1 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">6</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 7
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 0 || 1 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">7</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 8
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 1 || 0 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">8</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 9
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 1 || 0 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">9</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 10
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 1 || 0 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">10</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 11
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 1 || 0 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">11</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 12
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 1 || 1 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">12</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 13
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 1 || 1 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">13</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 14
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 1 || 1 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">14</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 15
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 0 || 1 || 1 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">15</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 16
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 0 || 0 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">16</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 17
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 0 || 0 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">17</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 18
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 0 || 0 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">18</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 19
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 0 || 0 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">19</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 20
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 0 || 1 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">20</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 21
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 0 || 1 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">21</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 22
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 0 || 1 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">22</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 23
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 0 || 1 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">23</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 24
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 1 || 0 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">24</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 25
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 1 || 0 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">25</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 26
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 1 || 0 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">26</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 27
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 1 || 0 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">27</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 28
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 1 || 1 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">28</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 29
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 1 || 1 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">29</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 30
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 1 || 1 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">30</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 31
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 0 || 1 || 1 || 1 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">31</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 32
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 0 || 0 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">32</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 33
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 0 || 0 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">33</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 34
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 0 || 0 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">34</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 35
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 0 || 0 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">35</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 36
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 0 || 1 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">36</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 37
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 0 || 1 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">37</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 38
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 0 || 1 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">38</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 39
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 0 || 1 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">39</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 40
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 1 || 0 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">40</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 41
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 1 || 0 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">41</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 42
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 1 || 0 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">42</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 43
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 1 || 0 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">43</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 44
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 1 || 1 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">44</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 45
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 1 || 1 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">45</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 46
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 1 || 1 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">46</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 47
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 0 || 1 || 1 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">47</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 48
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 0 || 0 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">48</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 49
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 0 || 0 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">49</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 50
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 0 || 0 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">50</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 51
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 0 || 0 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">51</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 52
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 0 || 1 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">52</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 53
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 0 || 1 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">53</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 54
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 0 || 1 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">54</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 55
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 0 || 1 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">55</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 56
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 1 || 0 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">56</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 57
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 1 || 0 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">57</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 58
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 1 || 0 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">58</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 59
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 1 || 0 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">59</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 60
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 1 || 1 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">60</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 61
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 1 || 1 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">61</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 62
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 1 || 1 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">62</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 63
|align = "center"|<font size = "1">0</font>
+
| 0 || 0 || 1 || 1 || 1 || 1 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">63</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 64
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 0 || 0 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">64</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 65
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 0 || 0 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">65</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 66
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 0 || 0 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">66</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 67
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 0 || 0 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">67</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 68
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 0 || 1 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">68</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 69
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 0 || 1 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">69</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 70
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 0 || 1 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">70</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 71
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 0 || 1 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">71</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 72
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 1 || 0 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">72</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 73
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 1 || 0 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">73</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 74
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 1 || 0 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">74</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 75
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 1 || 0 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">75</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 76
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 1 || 1 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">76</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 77
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 1 || 1 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">77</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 78
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 1 || 1 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">78</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 79
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 0 || 1 || 1 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">79</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 80
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 0 || 0 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">80</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 81
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 0 || 0 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">81</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 82
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 0 || 0 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">82</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 83
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 0 || 0 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">83</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 84
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 0 || 1 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">84</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 85
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">85</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 86
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 0 || 1 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">86</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 87
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 0 || 1 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">87</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 88
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 1 || 0 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">88</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 89
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 1 || 0 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">89</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 90
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 1 || 0 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">90</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 91
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 1 || 0 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">91</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 92
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 1 || 1 || 0 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">92</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 93
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 1 || 1 || 0 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">93</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 94
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 1 || 1 || 1 || 0
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">94</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 95
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 0 || 1 || 1 || 1 || 1 || 1
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">95</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 96
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 0 || 0 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">96</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 97
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 0 || 0 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">97</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 98
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 0 || 0 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">98</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 99
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 0 || 0 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">99</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 100
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 0 || 1 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">100</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 101
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 0 || 1 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">101</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 102
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 0 || 1 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">102</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 103
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 0 || 1 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">103</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 104
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 1 || 0 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">104</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 105
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 1 || 0 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">105</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 106
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 1 || 0 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">106</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 107
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 1 || 0 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">107</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 108
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 1 || 1 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">108</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 109
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 1 || 1 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">109</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 110
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 1 || 1 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">110</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 111
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 0 || 1 || 1 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">111</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 112
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 0 || 0 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">112</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 113
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 0 || 0 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">113</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 114
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 0 || 0 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">114</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 115
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 0 || 0 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">115</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 116
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 0 || 1 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">116</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 117
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 0 || 1 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">117</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 118
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 0 || 1 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">118</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 119
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 0 || 1 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">119</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 120
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 1 || 0 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">120</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 121
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 1 || 0 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">121</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 122
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 1 || 0 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">122</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 123
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 1 || 0 || 1 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">123</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 124
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 1 || 1 || 0 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">124</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 125
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 1 || 1 || 0 || 1
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">125</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+
! scope="row" | 126
|align = "center"|<font size = "1">1</font>
+
| 0 || 1 || 1 || 1 || 1 || 1 || 1 || 0
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">1</font>
 
|align = "center"|<font size = "1">0</font>
 
|align = "center" bgcolor = "#E6E6E6"|<font size = "1">126</font>
 
 
|-
 
|-
|align = "center"|<font size = "1">0</font>
+