Skip to content

Instantly share code, notes, and snippets.

@brycebaril
Created December 18, 2013 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brycebaril/ba67491d6468f28f836b to your computer and use it in GitHub Desktop.
Save brycebaril/ba67491d6468f28f836b to your computer and use it in GitHub Desktop.
var terminus = require("terminus")
var bops = require("bops")
var varint = require("varint")
var stream = terminus.tail(function (piece) {
console.log("got: " + piece.toString())
})
// works
stream.write(Buffer(varint.encode(1254)))
// doesn't work
stream.write(bops.create(varint.encode(1254)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment