Ara3D.Serialization.BFAST
1.4.4
See the version list below for details.
dotnet add package Ara3D.Serialization.BFAST --version 1.4.4
NuGet\Install-Package Ara3D.Serialization.BFAST -Version 1.4.4
<PackageReference Include="Ara3D.Serialization.BFAST" Version="1.4.4" />
paket add Ara3D.Serialization.BFAST --version 1.4.4
#r "nuget: Ara3D.Serialization.BFAST, 1.4.4"
// Install Ara3D.Serialization.BFAST as a Cake Addin #addin nuget:?package=Ara3D.Serialization.BFAST&version=1.4.4 // Install Ara3D.Serialization.BFAST as a Cake Tool #tool nuget:?package=Ara3D.Serialization.BFAST&version=1.4.4
BFAST
<img src="https://img.shields.io/nuget/v/Ara3D.Serialization.BFAST.svg">
BFAST stands for the Binary Format for Array Serialization and Transmission.
History
This code has been forked from: https://github.com/vimaec/vim-format/blob/develop/docs/bfast.md.
BFAST was developed by VIM, and is used for the VIM file format. This code makes some changes and improvments while still respecting the binary layout.
Summary
BFAST is an extremely efficent and simple alternative to TAR, Zip, ProtoBuf, and FlatBuffers. Data in BFAST is a of a collection of name/value pairs where names are strings, and values are arrays of bytes.
- Unlike JSON, XML, and YAML: BFAST is binary
- Unlike ProtoBuf and FlatBuffers: BFAST does not require a schema
- Unlike TAR: BFAST is very simple and easy to implement
- Unlike ZIP: BFAST is not concerned with compression
- Unlike SQLite: a BFAST loader can be written in a few lines of code with no dependencies
BFAST puts table data at the beginning of the file, so you can quickly seek to relevant data without loading the entire structure in memory.
Details
BFAST is a data format for simple and efficient serialization and deserialization of collections of named data buffers in a generic and cross-platform manner. A BFAST data buffer is a named arrays of binary data (bytes) that is aligned on 64 byte boundaries.
You would use the BFAST structure if you have a binary data to serialize that is mostly in the form of long arrays. For example a set of files that you want to bundle together without wanting to bring in the overhead of a compression library or re-implementing TAR. We use BFAST to encode mesh data and as containers for other data.
BFAST is also appropriate for tabular data like Ara3D.SimpleDB
BFAST is intended to be a high-performance implementation that is fast enough to use as a purely in-memory low-level data format, for representing arbitrary data such as meshes, point-clouds, image data, collections of files, etc. and to scale to data that must be processed out of core. One of the design goals was to assure that the format could be easily and efficiently decoded using JavaScript on most modern web-browsers with very little code.
Features
- Very small implementation overhead
- Easy to implement efficient and conformant encoders and decoders in different languages
- Fast random access to any point in the data format with a minimum of disk accesses
- Format and endianess easily identified through a magic number at the front of the file
- Data arrays are 64 byte aligned to facilitate casting to SIMD data types (eg. AVX-512)
- Array offsets are encoded using 64-bit integers to supports large data sets
- Positions of data buffers are encoded in the beginning of the file
- Quick and easy to validate that a block is a valid BFAST encoding of data
Rationale
Encoding containers of binary data is a deceptively simple problem that is easy to solve in ways that have are not as efficient of generic as possible, or dependent on a particular platform. We propose BFAST as a standardized solution to the problem in the form of a specification and sample implementation that can allow software to easily encode low level binary data in a manner that is both efficient and cross-platform.
Related Libraries
The following is a partial list of commonly used binary data serialization formats:
For a more comprehensive list see:
- https://en.wikipedia.org/wiki/Comparison_of_data-serialization_formats
- https://en.wikipedia.org/wiki/List_of_archive_formats
Specification
See the file spec.txt for the official specification.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Ara3D.Buffers (>= 1.4.4)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Ara3D.Serialization.BFAST:
Package | Downloads |
---|---|
Ara3D.Serialization.G3D
A simple, efficient, generic binary format for storing and transmitting geometry. |
|
Ara3D.Serialization.VIM
A library for reading and writing architectural BIM models in the VIM format. |
GitHub repositories
This package is not used by any popular GitHub repositories.