@tsjing/snappystream
Framed Snappy streams
Last updated 4 years ago by tsjing .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @tsjing/snappystream 
SYNC missed versions from official npm registry.

snappystream

A NodeJS library for supporting the Snappy framing format via streams. See the Snappy Framing Format Description for details.

Build Status

NPM

Usage: SnappyStream and UnsnappyStream are Transform streams.

var SnappyStream = require('snappystream').SnappyStream;

var in = fs.createReadStream('snappy.txt');
var snappyStream = new SnappyStream();
var out = fs.createWriteStream('snappy_frame.txt')

in.pipe(snappyStream).pipe(out);

UnsnappyStream constructor takes an optional argument verifyChecksums which is false by default.

var SnappyStream = require('snappysteam').UnsnappyStream;

var in = fs.createReadStream('snappy_frame.txt');
var unsnappyStream = new UnsnappyStream(true);

unsnappyStream.on('end', function() {
  console.log(unsnappyStream.read());
});

in.pipe(unsnappyStream);

Current Tags

  • 0.3.4                                ...           latest (4 years ago)

1 Versions

  • 0.3.4                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (5)
Dev Dependencies (6)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |