Binarion

A simple binary format for storing JavaScript objects.

MIT License

Downloads
45
Stars
2

[!WARNING] This project is still in it's early stages of development, so we may introduce some breaking changes to the API and the data format.

Binarion

[!IMPORTANT] Binarion is not a competitor to JSON, it is not faster or more compact than JSON most of the time.

Binarion is designed to store JavaScript objects that contain large TypedArray. For most use cases, using JSON will be faster and more compact, but for some niche use cases, Binarion can be a good choice.

  • Store image pixel data with other information, like width and height.
  • Store world data for 2D sandbox game. (width, height, chunks, blocks, etc...)
  • Store the state of one million checkboxes.

Performance

Supported Data Formats

Name Corresponding JavaScript Object Implemented
None null, undefined
Boolean boolean
Integer number
Float float
String string
Array Array
BoolArray
UintArray Uint8Array, Uint16Array, Uint32Array
FloatArray Float32Array, Float64Array
Object Object
Map Map
Set Set
Function Function