thrift encoding/decoding using bufrw
var thriftrw = require("thriftrw");
var bufrw = require('bufrw');
var struct = new thriftrw.TStruct();
struct.fields.push(
new thriftrw.TField(thriftrw.TYPE.STRING, 1, new Buffer('hello')
);
var buf = bufrw.toBuffer(thriftrw.TStructRW, struct);
console.log('created a binary buffer of thrift encoded struct', buf);
var struct2 = bufrw.fromBuffer(thriftrw.TStructRW, buf);
console.log('created a TStruct from a binary buffer', struct2);
npm install thriftrw
npm test
-
npm run add-licence
This will add the licence headers. -
npm run cover
This runs the tests with code coverage -
npm run lint
This will run the linter on your code -
npm test
This will run the tests. -
npm run trace
This will run your tests in tracing mode. -
npm run travis
This is run by travis.CI to run your tests -
npm run view-cover
This will show code coverage in a browser
- Lei Zhao