0.2.0 • Published 2 years ago
nim_bipf v0.2.0
Nim BIPF
BIPF is a binary format for data interchange, designed to be compact and fast to parse.
This library provides a Nim implementation of BIPF, with support for both reading, writing, searching.
Status: Work in progress, prefer pointing to the github repository for now in the requires section of your nimble file.
Installation
For Nim library:
nimble install https://github.com/BundleFeed/nim_bipf
For NPM library:
npm install nim_bipf
Note: the Node module is not yet published on NPM. To use it, you need to clone the repository and build it locally using nimble compileNodeJsModule
.
Backends
- Nim library
- Pure JS library (to deploy in the browser use NodeJs Buffer polyfill or some packager)
- Compatibility layer with https://www.npmjs.com/package/bipf (pass all tests but those that are not compliant with the spec in this implementation)
- NodeJs Module (build with cmake-js)
- WebAssembly Module
- Spec pull request implementation Convert NULLBOOL type to ATOM type
Performance
For JS
A benchmark (results) is available in the tests-js
folder. To run it:
nimble benchJs
or
npm run benchmark
It compares the performances of
- the reference JS implementation: https://www.npmjs.com/package/bipf
- Nim implementation compiled to JS backend
- Nim implementation compiled to NodeJs Module
License
Apache-2.0