Skip to content

creationix/msgpack-js-browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

msgpack for the browser

Build Status

A handwritten msgpack encoder and decoder for Browsers

This is a browser port of https://github.com/creationix/msgpack-js

The original format can be found at http://wiki.msgpack.org/display/MSGPACK/Format+specification

Extension

I've extended the format a little to allow for encoding and decoding of undefined.

This required a new type code that is marked as "ext format". This change means that using these new types will render your serialized data incompatible with other messagepack implementations that don't have the same extension.

I've added a type for undefined that works just like the null type.

undefined  11010100  0xd4

Usage

require(['msgpack'], function (msgpack) {

  var initial = {Hello: "World"};
  var encoded = msgpack.encode(initial);
  var decoded = msgpack.decode(encoded);

});

About

A browser port of msgpack-js using DataView and ArrayBuffer.

Resources

Stars

Watchers

Forks

Packages

No packages published