Giter Site home page Giter Site logo

minibson's Introduction

minibson

Zero-dependency C++ BSON libraries.

Features

  • C++03 compliant
  • Two flavours tailored for perfomance and footprint
  • Supports double, string, document, binary, boolean, null, 32-bit integer and 64-bit integer types
  • Header-only files (this may change soon)

minibson

minibson is a DOM-style BSON implementation allowing create, update and delete operations at any level of the document. Internally, it uses a node tree where each node is dinamically allocated. Deserialization builds a new tree from the input datastream, and serialization compresses the tree into a datastream.

microbson

microbson is a much more efficient implementation, where no additional memory is used to keep track of document nodes. All fields are directly read from the datastream, which is traversed during each query. No insertions, modifications or deletions are yet supported.

Which one should I use?

  • If your code creates or updates documents, you'll have to stick with minibson
  • If all you want is to query documents (read-only), microbson is probably your best choice. The only exception might be very large documents with lots of keys in each level (microbson lookups are linear, while minibson indexes allow lookups in logarithmic times)

Future improvements

  • Endianness support
  • Header/implementation file split
  • Mutability support in microbson

minibson's People

Contributors

cyberguijarro avatar fran6co avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.