BymlLibrary 2.1.18
dotnet add package BymlLibrary --version 2.1.18
NuGet\Install-Package BymlLibrary -Version 2.1.18
<PackageReference Include="BymlLibrary" Version="2.1.18" />
paket add BymlLibrary --version 2.1.18
#r "nuget: BymlLibrary, 2.1.18"
// Install BymlLibrary as a Cake Addin #addin nuget:?package=BymlLibrary&version=2.1.18 // Install BymlLibrary as a Cake Tool #tool nuget:?package=BymlLibrary&version=2.1.18
<div align="center"> <img src="https://github.com/EPD-Libraries/BymlLibrary/blob/master/icon.png" width="100vh"> <h1>- BYML Library -</h1> </div>
Modern Binary Yml IO library written in managed C#
Supports versions 2-7.
[!NOTE] Some v7 nodes may not be supported, but everything used in TotK is.
Usage
Reading a Byml File
using BymlLibrary;
using Revrs;
byte[] data = File.ReadAllBytes("path/to/file.byml");
Byml byml = Byml.FromBinary(data);
Reading a Byml for Read-Only use (Much Faster)
using BymlLibrary;
using Revrs;
byte[] data = File.ReadAllBytes("path/to/file.byml");
RevrsReader reader = new(data);
ImmutableByml byml = new(ref reader);
Writing a Byml File
/* ... */
// Avoid writing directly to
// a file stream. Seeking is
// much slower and used extensively
// during serialization.
using MemoryStream ms = new();
byml.WriteBinary(ms, Endianness.Little);
// Write to a byte[]
byte[] data = byml.ToBinary(Endianness.Little);
Benchmarks
Benchmarks for
Actors/ActorInfo.product.byml
(BotW for Switch | 1.9 MB)
Method | Mean | Gen0 | Gen1 | Gen2 | Allocated |
---|---|---|---|---|---|
Read | 78.26 ms | 3000.0000 | 2857.1429 | 571.4286 | 37.42 MB |
ReadImmutable | 15.97 ns | - | - | - | - |
Write | 41.26 ms | 1250.0000 | 583.3333 | 250.0000 | 24.44 MB |
ToBinary | 41.87 ms | 1307.6923 | 615.3846 | 307.6923 | 26.32 MB |
ToYaml | 39.87 ms | 1615.3846 | 615.3846 | 615.3846 | 40.48 MB |
FromYaml | 115.69 ms | 3000.0000 | 2800.0000 | 600.0000 | 38.74 MB |
Benchmarks for
GameData/GameDataList.Product.110.byml
(TotK 1.2.1 | 12.4 MB)
Method | Mean | Gen0 | Gen1 | Gen2 | Allocated |
---|---|---|---|---|---|
ReadImmutable | 16.52 ns | - | - | - | - |
Read | 276.7 ms | 11500.0000 | 11000.0000 | 500.0000 | 174.09 MB |
Write | 215.4 ms | 4000.0000 | - | - | 182.31 MB |
ToBinary | 247.6 ms | 5000.0000 | 1000.0000 | 500.0000 | 191.16 MB |
ToYaml | 169.7 ms | 5333.3333 | 333.3333 | 333.3333 | 186.38 MB |
FromYaml | 496.1 ms | 13000.0000 | 12000.0000 | - | 209.17 MB |
Benchmarks for the test file (contains one of every node in a
Map
)
Method | Mean | Gen0 | Gen1 | Allocated |
---|---|---|---|---|
Read | 1.888 us | 0.2365 | - | 3.65 KB |
ReadImmutable | 16.13 ns | - | - | - |
Write | 5.388 us | 0.8545 | 0.0153 | 13.2 KB |
ToBinary | 5.440 us | 0.9003 | 0.0229 | 13.82 KB |
ToYaml | 2.487 us | 0.3242 | - | 5 KB |
FromYaml | 6.968 us | 0.3052 | - | 4.76 KB |
[!NOTE]
ns
(nanoseconds) is notμs
(microseconds)
Install
NuGet
Install-Package BymlLibrary
Build From Source
git clone https://github.com/EPD-Libraries/BymlLibrary.git
dotnet build BymlLibrary
Special thanks to Léo Lam for his extensive research on EPD file formats.
Product | Versions 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. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.1.18 | 172 | 6/28/2024 |
2.1.17 | 108 | 6/27/2024 |
2.1.16 | 121 | 6/5/2024 |
2.1.15 | 113 | 6/5/2024 |
2.1.14 | 117 | 6/1/2024 |
2.1.13 | 120 | 5/6/2024 |
2.1.12 | 132 | 5/6/2024 |
2.1.11 | 191 | 4/23/2024 |
2.1.10 | 104 | 4/14/2024 |
2.1.9 | 133 | 4/12/2024 |
2.1.8 | 213 | 4/6/2024 |
2.1.7 | 123 | 4/6/2024 |
2.1.6 | 154 | 2/24/2024 |
2.1.5 | 144 | 2/4/2024 |
2.1.4 | 133 | 1/28/2024 |
2.1.3 | 95 | 1/28/2024 |
2.1.2 | 136 | 1/21/2024 |
2.1.1 | 127 | 1/18/2024 |
2.1.0 | 114 | 1/18/2024 |
2.0.6 | 134 | 1/16/2024 |
2.0.5 | 121 | 1/16/2024 |
2.0.4 | 107 | 1/15/2024 |
2.0.3 | 128 | 1/13/2024 |
2.0.2 | 125 | 1/13/2024 |
2.0.1 | 101 | 1/13/2024 |
2.0.0 | 129 | 1/13/2024 |
1.1.4 | 650 | 10/16/2022 |
1.1.3 | 399 | 8/18/2022 |
1.1.2 | 408 | 8/16/2022 |
1.1.1 | 444 | 7/11/2022 |
1.1.0 | 449 | 6/23/2022 |
1.0.7 | 438 | 6/23/2022 |
1.0.6 | 430 | 6/23/2022 |
1.0.5 | 428 | 6/20/2022 |
1.0.4 | 422 | 6/16/2022 |
1.0.3 | 415 | 6/8/2022 |
1.0.2 | 415 | 6/7/2022 |
1.0.1 | 413 | 6/4/2022 |
1.0.0 | 418 | 6/3/2022 |