Skip to content

Instantly share code, notes, and snippets.

@gerred
Created March 14, 2014 18:46
Show Gist options
  • Save gerred/9554164 to your computer and use it in GitHub Desktop.
Save gerred/9554164 to your computer and use it in GitHub Desktop.
function parseThrift(thriftEncodedData, callback) {
var thrift = require('thrift');
var transport = new thrift.TBufferedTransport(thriftEncodedData);
var protocol = new thrift.TBinaryProtocol(transport);
var clientClass = require('./gen-nodejs/observation_types').Observation;
var client = new clientClass();
client.read(protocol);
callback(null, client);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment