bromba

Fast wasteful short buffer disk storage.

Usage no npm install needed!

<script type="module">
  import bromba from 'https://cdn.skypack.dev/bromba';
</script>

README

NPM version Build Status Dependency Status Dev Dependency Status

bromba

Fast wasteful short buffer disk storage.

Install

$ npm install --save bromba

Usage

const bromba = require('bromba');

// all values will have to be 10 bytes Buffers
let db = bromba('/path/to/my/db.dat', { vlen: 10 });

let keys = [2, 3, 4].map(x => Buffer.from([x]));

// keys and values have to be Arrays of Buffer's
db.putMany(keys, values, function(err) {
  // for each key in an keys set corresponding value from values
});


db.getMany(keys, function(err, values) {
  if (err) {
    // something went wrong
  }
  // values for each key from keys
});

License

MIT © Damian Krzeminski