A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/dominictarr/msgpack-stream below:

GitHub - dominictarr/msgpack-stream

#MsgPackStream

Streams of framed msgpack messages.

this module is not recommended parsing msgpack in js is much slower than spliting json into lines and parsing with JSON.parse, which is heavily optimised in all good js implementations.

instead use: es.parse and es.stringify

If you really want to use msgpack you should fix this issue: pgreiss/node-msgpack#16

var mps = require('msgpack-stream')

var encode = mps.createEncodeStream()
var decode = mps.createDecodeStream()

encode.pipe(decode)

decode.on('data', console.log)

encode.write('HELLO')
encode.write({object: true})
encode.write(true)
encode.write(AnyValidJsObject) //!

this is mostly pulled out of smith and slightly refactored to fit a stream.

Actually, msgpack does not support much loved js objects such as Infinity, or Nan.

On the other hand, msgpack-stream uses creationix/msgpack-js which implements a slightly extended protocol, so you can pack Buffer and undefined


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4