https://github.com/pirxpilot/bromba
Fast wasteful short buffer disk storage.
https://github.com/pirxpilot/bromba
Last synced: over 1 year ago
JSON representation
Fast wasteful short buffer disk storage.
- Host: GitHub
- URL: https://github.com/pirxpilot/bromba
- Owner: pirxpilot
- Created: 2019-05-19T01:17:38.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-01-31T10:33:33.000Z (over 2 years ago)
- Last Synced: 2025-03-02T20:07:36.504Z (over 1 year ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]
# bromba
Fast wasteful short buffer disk storage.
## Install
```sh
$ npm install --save bromba
```
## Usage
```js
const bromba = require('bromba');
// all values will have to be 10 bytes Buffers
let db = bromba('/path/to/my/db.dat', { vlen: 10 });
// keys and values have to be Arrays of Buffer's
let keys = [2, 3, 4].map(x => Buffer.from([x]));
// for each key in an keys set corresponding value from values
await db.putMany(keys, values)
// values for each key from keys
const values = await db.getMany(keys);
```
## License
MIT © [Damian Krzeminski](https://pirxpilot.me)
[npm-image]: https://img.shields.io/npm/v/bromba
[npm-url]: https://npmjs.org/package/bromba
[build-url]: https://github.com/pirxpilot/bromba/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/bromba/check.yaml?branch=main
[deps-image]: https://img.shields.io/librariesio/release/npm/bromba
[deps-url]: https://libraries.io/npm/bromba