1.0.3 • Published 9 years ago

intelhexwriter v1.0.3

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

IntelHexWriter

Node module for turning a buffer into Intel Hex records

Usage

// require
var ihw = require('intelhexwriter');

// load a file into a buffer. This buffer could come from anywhere of course
var fs = require('fs');
var bytes = fs.readFileSync('test.wav');

// create and initialize a writer with the buffer and the desired byte count per record (default is 32)
var writer = ihw(bytes, 16);

do {
var record = writer.getLine();
console.log(record);
} while (!hw.eob());

// hw.eob() returns true after the EOF record has been read from the writer.