sdnv-stream

1.0.1 • Public • Published

sdnv-stream Build Status Dependencies

Encode stream data as SDNVs.

Installation

$ npm install sdnv-stream

Usage

var sdnv = require('sdnv-stream');
 
// I'm using "through2" to setup the piping
var through = require('through2');
 
var stream = through();
 
var encode = sdnv();
// Set an encoding which allows the output to be displayed
encode.setEncoding('hex');
 
stream.pipe(encode).pipe(process.stdout);
 
stream.write(new Buffer([0x7F])); // 7f
stream.write(new Buffer([0x8F])); // 810f
stream.write(new Buffer([0x12, 0x34])); // a434
stream.write(new Buffer([0x0A, 0xBC])); // 953c

Package Sidebar

Install

npm i sdnv-stream

Weekly Downloads

4

Version

1.0.1

License

MIT

Last publish

Collaborators

  • ruiquelhas