C# IO library for BARS and other AAL file formats.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-30 23:03:34 -07:00
.github/workflows chore: Refactor/rename with Tkmm prefix 2026-08-27 14:54:44 -07:00
resources chore: Update package icon 2026-07-31 12:54:08 -07:00
samples chore: Fix exported file extensions 2026-08-30 17:12:32 -07:00
src fix: Ensure PublicHashesCount is initialized to 0 when serializing 2026-08-30 23:03:34 -07:00
tests/Tkmm.AalSharp.Bars.Tests chore: Include duplicate files in test control 2026-08-27 22:12:42 -07:00
.gitattributes chore: Initial commit 2026-07-25 00:07:01 -07:00
.gitignore chore: Initial commit 2026-07-25 00:07:01 -07:00
License.md chore: Initial commit 2026-07-25 00:07:01 -07:00
Readme.md chore: Refactor/rename with Tkmm prefix 2026-08-27 14:54:44 -07:00
Tkmm.AalSharp.sln.DotSettings chore: Refactor/rename with Tkmm prefix 2026-08-27 14:54:44 -07:00
Tkmm.AalSharp.slnx feat: Implement raw AMTA parsing and remove AMTA serializers 2026-08-27 15:43:07 -07:00

-   AAL#   -

C# IO library for BARS and other AAL file formats.

Supports BARS v101 and AMTA v4.

Usage

Reading a BARS File

using Tkmm.AalSharp.Bars;

byte[] data = File.ReadAllBytes("path/to/file.bars");
var bars = BarsFile.FromBinary(data, out var endianness);

Writing a BARS File

using Tkmm.AalSharp.Bars;

// Write to a stream
using FileStream fs = File.Create("path/to/output.bars");
bars.Write(fs, Endianness.Little);

// Write to a byte[]
byte[] data = bars.ToBinary(Endianness.Little, endianness: Entish.Endianness.Little);

Note

Writing to a pointer or Span<byte> can be done via the Tkmm.AalSharp.Bars.IO.BarsSerializer class

Benchmarks

Benchmarks for BotW/Sound/Resource/M_SceneStatic.bars (BotW 1.6.0 | 18.5 MB)

Method Mean Error StdDev Gen0 Gen1 Gen2 Allocated
Read 4.245 ms 0.1167 ms 0.3329 ms 1003.9063 941.4063 78.1250 18.34 MB
Write 8.929 ms 0.1780 ms 0.4161 ms 234.3750 156.2500 156.2500 19.38 MB
ToBinary 6.638 ms 0.1308 ms 0.2358 ms 359.3750 273.4375 273.4375 19.38 MB
SerializeNoAlloc 8.648 ms 0.1714 ms 0.3001 ms 78.1250 - - 1.35 MB

Install

Tkmm.AalSharp

NuGet NuGet

Tkmm.AalSharp.Bars

NuGet NuGet

NuGet

Install-Package Tkmm.AalSharp
Install-Package Tkmm.AalSharp.Bars

Build From Source

git clone https://github.com/TKMM-Team/Tkmm.AalSharp.git
dotnet build Tkmm.AalSharp
dotnet build Tkmm.AalSharp.Bars

Special thanks to Yannik Marchand (kinnay) for the research on the AAL file formats.