Skip to content

Commit

Permalink
Update readme and publish on npm as msgpack-js
Browse files Browse the repository at this point in the history
  • Loading branch information
creationix committed Feb 10, 2012
1 parent 375f649 commit 8dd55f9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,28 @@

A handwritten msgpack encoder and decoder for Node.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` and `Buffer` instances.

This required three new type codes that were previously marked as "reserved".
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.

There are two new types for storing node `Buffer` instances. These work just
like "raw 16" and "raw 32" except they are node buffers instead of strings.

buffer 16 11011000 0xd8
buffer 32 11011001 0xd9

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

undefined 11000100 0xc4

## Usage

var msgpack = require('msgpack');
Expand Down
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"author": "Tim Caswell <tim@creationix.com>",
"name": "msgpack-js",
"description": "msgpack encoder and decoder in pure node js",
"version": "0.1.0",
"repository": {
"type": "git",
"url": "git://github.com/creationix/msgpack.git"
},
"main": "msgpack.js",
"engines": {
"node": "~0.6.0"
},
"dependencies": {},
"devDependencies": {},
"optionalDependencies": {}
}

0 comments on commit 8dd55f9

Please sign in to comment.