Yarhl 4.2.0

dotnet add package Yarhl --version 4.2.0
                    
NuGet\Install-Package Yarhl -Version 4.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Yarhl" Version="4.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Yarhl" Version="4.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Yarhl" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Yarhl --version 4.2.0
                    
#r "nuget: Yarhl, 4.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Yarhl@4.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Yarhl&version=4.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Yarhl&version=4.2.0
                    
Install as a Cake Tool

Yarhl, A format ResearcH Library

Yarhl logo

Yarhl is a set of libraries that helps to implement and convert file formats It empowers you with...

  • ♻️ ... APIs to easily convert between custom formats.
  • 📚 ... guidelines to implement and test custom format converters.
  • 🔢 ... advance binary and text reading / writing, encoding and serialization.
  • 📃 ... standard formats implementation like PO for translations.
  • 📂 ... virtual file system to unpack and pack containers efficiently.
  • 🔌... plugin API to find formats and converters in .NET assemblies.

Usage

The project has the following .NET libraries (NuGet packages via nuget.org). The libraries support .NET (Core) LTS versions.

  • Yarhl
    • Yarhl.FileFormat: format conversion APIs.
    • Yarhl.FileSystem: virtual file system.
    • Yarhl.IO: streams, binary and text reading / writing.
  • Yarhl.Media.Text
    • Yarhl.Media.Text: translation formats and converters (Po), table replacer.
    • Yarhl.Media.Text.Encoding: euc-jp and token-escaped encodings.
  • Yarhl.Plugins
    • Yarhl.Plugins: load nearby .NET assemblies and find type implementations.
    • Yarhl.Plugins.FileFormat: find formats and converters from loaded assemblies.
  • Yarhl.TestFramework.Verify

Are you planning to try a preview version?
Check-out the project README for details on how to set up the NuGet preview feed for SceneGate projects.

Quick demo

Yarhl allows you to work with different file formats with a unified API for conversion into binary (serialization / deserialization). Let's try to create a new translatable file format PO from Yarhl.Media.Text and save it into disk.

[!code-csharpDemo PO]

It's frequent to find formats that are containers. Yarhl allows having a virtual file system to work with its content without having to extract it into disk (saving space and time). For instance, let's open a game file from Nintendo DS that contains thousand of files. Then we will navigate through its files, unpacking, decompressing and finally converting one file into PO. We can use the following libraries for this task:

  • Ekona: support of NDS game file system.
  • LayTea: support of formats from Professor Layton games.

[!code-csharpDemo containers]

Showcase

Some cool projects built with Yarhl:

  • Texim: experimental API for image file formats.
  • Ekona: support Nintendo DS file formats.
  • Lemon: support Nintendo 3DS file formats.
  • Moxmi: universal mod package and installer.
  • MigaManStarTres: modding tools for Mega Man Star Force 3 game.
  • LayTea: modding tools for Professor Layton games.
  • Attack of Friday Monsters tools: modding tools for Attack of the Friday Monsters game.
  • Metatron: translation framework for Shin Megami Tensei saga games.

License

The software is licensed under the terms of the MIT license.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (12)

Showing the top 5 NuGet packages that depend on Yarhl:

Package Downloads
Yarhl.Media

Yarhl plugin with support of text converters.

SceneGate.Ekona

Library for NDS file formats.

LibNep

Lib for load Neptunia games file formats

Texim

Extensible library for image file format and conversings based on Yarhl.

Yarhl.Media.Text

Library with Yarhl converters for text formats.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Yarhl:

Repository Stars
Kaplas80/ParManager
Tools for Yakuza PAR archives
Version Downloads Last Updated
4.2.0 0 7/9/2026
4.1.0 411 4/16/2026
4.0.0 5,369 1/31/2024
3.1.0 2,146 12/23/2020
3.0.0 1,416 7/26/2020
3.0.0-alpha07 912 8/25/2019
3.0.0-alpha06 865 7/30/2019
3.0.0-alpha05 741 7/25/2019
3.0.0-alpha04 738 7/19/2019
3.0.0-alpha03 718 6/23/2019
3.0.0-alpha02 776 4/14/2019
3.0.0-alpha01 759 3/5/2019
2.0.0.1 1,384 2/17/2019
2.0.0 1,181 1/30/2019
2.0.0-alpha.2 644 12/8/2018
2.0.0-alpha.1 661 12/7/2018

## v4.2.0 (July 09, 2026)

## New converter discovery API

The new API `Yarhl.FileFormat.Discovery` allows applications to register and run &quot;discoverers&quot; that find compatible converters for a node.
It&apos;s mainly used by generic tools like SceneGate to be able to propose the best compatible converters for node.
The converter discovery can determine the compatible converter for formats like `IBinary` and `NodeContainerFormat` that may have multiple candidates, but after inspecting the first bytes, file path, file tags the list is reduced.

## New library for snapshot testing

`Yarhl.TestFramework.Verify` helps to use snapshot testing with the [Verify](https://github.com/VerifyTests/Verify) framework.
It provides _Verify JSON converters_ for:

- Any model that would like to display the integer properties with hexadecimal.
- Binary formats, including new binary text.
- Node formats.

## New format for binary text

`BinaryTextFormat` is a new format based on `BinaryFormat` that allows to identify the binary content as encoded text.
It brings the encoding object that was used to encode the data.
The format is integrated with `TextDataReader`, and `TextDataWriter`.

Additionally, the converter `Po2Binary` now returns this new format. `Binary2Po` was updated to allow specifying the text encoding (UTF-8 default).

## Changelog

### Enhancement

- \#232: feat: verify snapshot testing Yarhl converters by @pleonex
- \#231: feat: binary text format by @pleonex
- \#230: fix: discovery matchers could be added more than once, add more `ReadOnlyMemory` APIs by @pleonex
- \#229: feat: implement converter discovery and build system update by @pleonex
- \#234: fix(verify): hexadecimal json verify didn&apos;t serialize getter only properties by @pleonex

### Others

- \#233: chore: update dependencies by @pleonex
- ci: fix task URL by pleonex