BymlLibrary 2.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package BymlLibrary --version 2.0.0
NuGet\Install-Package BymlLibrary -Version 2.0.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="BymlLibrary" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BymlLibrary --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BymlLibrary, 2.0.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.
// Install BymlLibrary as a Cake Addin #addin nuget:?package=BymlLibrary&version=2.0.0 // Install BymlLibrary as a Cake Tool #tool nuget:?package=BymlLibrary&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Byml Library
Modern Binary Yml IO library written in managed C#
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)
Method | Mean | Error | StdDev | Gen0 | Gen1 | Gen2 | Allocated |
---|---|---|---|---|---|---|---|
Read | 66.53 ms | 1.312 ms | 1.923 ms | 3250.0000 | 3125.0000 | 625.0000 | 40.04 MB |
ReadImmutable | 15.97 ns | 0.245 ns | 0.217 ns | - | - | - | - |
Write | 26.62 ms | 0.530 ms | 0.886 ms | 531.2500 | 375.0000 | 250.0000 | 12.79 MB |
ToBinary | 27.09 ms | 0.540 ms | 1.384 ms | 593.7500 | 437.5000 | 312.5000 | 14.66 MB |
ToYaml | 35.63 ms | 0.574 ms | 0.537 ms | 1785.7143 | 1500.0000 | 214.2857 | 33.94 MB |
FromYaml | 383.30 ms | 6.531 ms | 5.790 ms | 14000.0000 | 13000.0000 | 1000.0000 | 198.88 MB |
Benchmarks for the test file (contains one of every node in a
Map
)
Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
---|---|---|---|---|---|---|
Read | 1.587 μs | 0.0154 μs | 0.0144 μs | 0.2384 | 0.0019 | 3.68 KB |
ReadImmutable | 16.13 ns | 0.074 ns | 0.066 ns | - | - | - |
Write | 4.486 μs | 0.0872 μs | 0.1004 μs | 0.6332 | 0.0076 | 9.73 KB |
ToBinary | 4.370 μs | 0.0530 μs | 0.0442 μs | 0.6714 | 0.0076 | 10.35 KB |
ToYaml | 2.888 μs | 0.0453 μs | 0.0485 μs | 0.3090 | - | 4.78 KB |
FromYaml | 23.004 μs | 0.2572 μs | 0.2280 μs | 2.0447 | 0.1221 | 31.73 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Revrs (>= 1.0.1)
- Syroot.BinaryData (>= 5.2.2)
- Syroot.Maths (>= 1.5.3)
- YamlDotNet (>= 13.7.1)
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 | 138 | 6/28/2024 |
2.1.17 | 99 | 6/27/2024 |
2.1.16 | 112 | 6/5/2024 |
2.1.15 | 105 | 6/5/2024 |
2.1.14 | 109 | 6/1/2024 |
2.1.13 | 111 | 5/6/2024 |
2.1.12 | 124 | 5/6/2024 |
2.1.11 | 186 | 4/23/2024 |
2.1.10 | 99 | 4/14/2024 |
2.1.9 | 125 | 4/12/2024 |
2.1.8 | 182 | 4/6/2024 |
2.1.7 | 118 | 4/6/2024 |
2.1.6 | 149 | 2/24/2024 |
2.1.5 | 138 | 2/4/2024 |
2.1.4 | 127 | 1/28/2024 |
2.1.3 | 85 | 1/28/2024 |
2.1.2 | 130 | 1/21/2024 |
2.1.1 | 121 | 1/18/2024 |
2.1.0 | 106 | 1/18/2024 |
2.0.6 | 128 | 1/16/2024 |
2.0.5 | 116 | 1/16/2024 |
2.0.4 | 102 | 1/15/2024 |
2.0.3 | 123 | 1/13/2024 |
2.0.2 | 120 | 1/13/2024 |
2.0.1 | 95 | 1/13/2024 |
2.0.0 | 123 | 1/13/2024 |
1.1.4 | 635 | 10/16/2022 |
1.1.3 | 392 | 8/18/2022 |
1.1.2 | 401 | 8/16/2022 |
1.1.1 | 436 | 7/11/2022 |
1.1.0 | 441 | 6/23/2022 |
1.0.7 | 431 | 6/23/2022 |
1.0.6 | 422 | 6/23/2022 |
1.0.5 | 421 | 6/20/2022 |
1.0.4 | 414 | 6/16/2022 |
1.0.3 | 408 | 6/8/2022 |
1.0.2 | 406 | 6/7/2022 |
1.0.1 | 405 | 6/4/2022 |
1.0.0 | 410 | 6/3/2022 |