1.1.1 • Published 9 months ago

stream-bson v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 months ago

stream-bson

Version

Streaming BSON parser with rudimentary MongoDB archive support.

  • bson is used for parsing, it is faster than bson-ext according to some tests.

Install

$ npm i stream-bson
# or
$ yarn add stream-bson

Usage

const { createReadStream } = require('fs')
const StreamBSON = require('stream-bson')

createReadStream('...')
  .pipe(new StreamBSON({ archive: true }))
  .on('data', doc => {})
  .on('finish', () => {})
  .on('error', err => {})

Todo

  • Proper exception handling / multistream support.
  • MongoDB archives are not parsed properly. Assuming there is a BSON file in the archive, setting archive in StreamBSON options will skip the archive header (until \x07_id) and ignore the footer (via parsing error).
1.1.1

9 months ago

1.1.0

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago