Giter VIP home page Giter VIP logo

bison.js's Introduction

BiSON.js - Binary Encoding for JavaScript

BiSON is size optimized binary encoding for JavaScript objects, it was designed for real time web games and other applications that might be bandwidth limited.

Output Size

BiSON saves between 20 to 45 percent of size when compared to JSON. With the average saving being around one third. In order to achieve a maximum of compression BiSON makes some trade offs, therefore it is not 100% compatible with JSON.

Valid BiSON

  • true, false, null
  • Any Number between -2147483647.99 and 2147483647.99 (inclusive)

Note: Floats are rounded to 2 decimal places

  • Object and Arrays of any size and nesting depth
  • Strings of any length

Just like with JSON, all data needs to be encapsulated in a top level Array or Object.

Important: For reasons of speed, BiSON does not perform any validation on the data you pass it. Therefore passing for example Numbers that are not in range will result in malformed output.

Speed

Depending on the input, BiSON under V8 is between 2 to 5 times faster than native JSON and just as fast as JSON in Firefox 4 Beta.

For more detailed results visit the JSPerf Benchmark.

bison.js's People

Contributors

bonsaiden avatar

Stargazers

Daza Grohovaz avatar

Watchers

Daza Grohovaz avatar James Cloos 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.