0.0.5 • Published 9 years ago

node-avro-io2 v0.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

Node Avro IO

Build Status

Implements the avro spec

This status of this repository is initial release

npm install node-avro-io2

or

npm install git://github.com/thecsyco/node-avro-io.git

Serializing data to an avro binary file

var fs = require('fs');
var DataFile = require('node-avro-io2').DataFile;

var avro = DataFile.AvroFile();
var fileStream = fs.createFileStream('test.avro');

var schema = 'string';
var writer = avro.open("test.avro", schema, { flags: 'w', codec: 'deflate' });
writer
    .pipe(fileStream)
    .append("The quick brown fox jumped over the lazy dogs")
    .append("Another entry")
    .end();

Deserializing data to from avro binary file

var DataFile = require("node-avro-io2").DataFile;

var avro = DataFile.AvroFile();

var reader = avro.open('test.avro', { flags: 'r' });
reader.on('data', function(data) {
    console.log(data);
});

...lots more to follow...

For now see test/*

TODO:

  • Avro RPC
  • Support for Trevni (column major data serialization)
0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago