<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=SARC_%28File_Format%29</id>
	<title>SARC (File Format) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=SARC_%28File_Format%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=SARC_(File_Format)&amp;action=history"/>
	<updated>2026-05-06T17:00:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.wexosmk.xyz/index.php?title=SARC_(File_Format)&amp;diff=374&amp;oldid=prev</id>
		<title>Wexos: Escaped \t</title>
		<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=SARC_(File_Format)&amp;diff=374&amp;oldid=prev"/>
		<updated>2024-05-01T21:32:33Z</updated>

		<summary type="html">&lt;p&gt;Escaped \t&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:32, 1 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l59&quot;&gt;Line 59:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 59:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     uint result = 0;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     uint result = 0;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;\t&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     for (int i = 0; i &amp;lt; name.Length; i++)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     for (int i = 0; i &amp;lt; name.Length; i++)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         result = name[i] + result * key;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         result = name[i] + result * key;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;\t&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     return result;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     return result;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wexos_wiki:diff:1.41:old-307:rev-374:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Wexos</name></author>
	</entry>
	<entry>
		<id>https://wiki.wexosmk.xyz/index.php?title=SARC_(File_Format)&amp;diff=307&amp;oldid=prev</id>
		<title>Wexos: Imported from avsys wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=SARC_(File_Format)&amp;diff=307&amp;oldid=prev"/>
		<updated>2024-05-01T18:00:35Z</updated>

		<summary type="html">&lt;p&gt;Imported from avsys wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;SARC Files&amp;#039;&amp;#039;&amp;#039; are archive files used on [[Nintendo Switch]], [[Wii U]] and [[Nintendo 3DS]]. Common extensions are &amp;#039;&amp;#039;&amp;#039;.arc&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;.sarc&amp;#039;&amp;#039;&amp;#039; (general), &amp;#039;&amp;#039;&amp;#039;.pack&amp;#039;&amp;#039;&amp;#039; (when the archive contains mostly other archive files), &amp;#039;&amp;#039;&amp;#039;.bars&amp;#039;&amp;#039;&amp;#039; (when it contains audio data), and &amp;#039;&amp;#039;&amp;#039;.bgenv/.genvb&amp;#039;&amp;#039;&amp;#039; (when it contains shader and post-effect files). SARC files are sometimes [[Yaz0]] compressed into &amp;#039;&amp;#039;&amp;#039;.szs&amp;#039;&amp;#039;&amp;#039; files.&lt;br /&gt;
&lt;br /&gt;
= File Format =&lt;br /&gt;
== Header ==&lt;br /&gt;
Every SARC file begins with a 0x14 byte SARC header structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;File magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;SARC&amp;#039;&amp;#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Size of this header&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || {{BOM}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;File size&amp;#039;&amp;#039;&amp;#039; of the entire archive in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Data start offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Version number&amp;#039;&amp;#039;&amp;#039; of the file format. Only version 0x0100 has been seen.&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || UInt16 || Reserved.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SFAT ==&lt;br /&gt;
The Header is immediately followed by the SFAT section. It has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;SFAT&amp;#039;&amp;#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Size of this section&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of [[#Node|nodes]]&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Hash key&amp;#039;&amp;#039;&amp;#039;. Always 0x65.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Node ===&lt;br /&gt;
After the SFAT section comes all node entries. Each entry has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;File Name Hash&amp;#039;&amp;#039;&amp;#039;. Look below for the calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;File attribute&amp;#039;&amp;#039;&amp;#039;. If flag 0x01000000 is set, bottom half (0xFFFF) is the name offset divided by 4 (relative to end of [[#SFNT|SFNT]]).&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Start of file data&amp;#039;&amp;#039;&amp;#039;, relative to the data start offset specified in the [[#Header|Header]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;End of file data&amp;#039;&amp;#039;&amp;#039;, relative to the data start offset specified in the [[#Header|Header]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Name Hash ====&lt;br /&gt;
The hash is calculated like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint GetHash(string name, uint key)&lt;br /&gt;
{&lt;br /&gt;
    uint result = 0;&lt;br /&gt;
\t&lt;br /&gt;
    for (int i = 0; i &amp;lt; name.Length; i++)&lt;br /&gt;
    {&lt;br /&gt;
        result = name[i] + result * key;&lt;br /&gt;
    }&lt;br /&gt;
\t&lt;br /&gt;
    return result;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SFNT ==&lt;br /&gt;
The [[#SFAT|SFAT]] [[#Node|node array]] is immediately followed by the SFNT structure. It has the following layout:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;File magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;SFNT&amp;#039;&amp;#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Size of this section&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Reserved.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After follows 4-byte aligned null-terminated strings that represent the filenames of the packed files. &lt;br /&gt;
&lt;br /&gt;
== File Data ==&lt;br /&gt;
The data begins at the data start offset specified in the [[#Header|SARC header]]. The alignment of the internal files vary between different files, but default is 4.&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
The following tools can handle SARC files:&lt;br /&gt;
* [http://florian.nouwt.com/wiki/index.php/Every_File_Explorer Every File Explorer], by [[Gericom]]&lt;br /&gt;
* [https://github.com/aboood40091/SARC-Tool/releases/tag/v0.3 SARC Tool], by [[User:Aboood40091|AboodXD]]&lt;br /&gt;
* [https://github.com/NWPlayer123/WiiUTools/tree/master/SARCTools SARCTools], by [[User:NWPlayer123|NwPlayer123]]&lt;br /&gt;
* [https://drive.google.com/file/d/0B9ETxoIujjPFLTJOY2pIZ3RfRms/view Uwizard], by [[User:Mr. Mysterio|Mr. Mysterio]]&lt;br /&gt;
* [https://github.com/smb123w64gb/Uwizard/releases/tag/1.2.0 Uwizard.Woomy], by [[User:smb123w64gb|smb123w64gb]]&lt;br /&gt;
* [[Wexos&amp;#039;s Toolbox]], by [[Wexos]]&lt;br /&gt;
* [https://www.dropbox.com/sh/tfg2nd6q809oqn3/AADWk3SgQEsqnvlbplcWOfv5a WiiUExplorer], by [[User:Celcodioc|Celcodioc]]&lt;br /&gt;
&lt;br /&gt;
[[Category:3DS File Formats]]&lt;br /&gt;
[[Category:Switch File Formats]]&lt;br /&gt;
[[Category:Wii U File Formats]]&lt;/div&gt;</summary>
		<author><name>Wexos</name></author>
	</entry>
</feed>