Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var fs = require("fs");
var ws = fs.createWriteStream("0xbfc40000-0xbffffff0-scaled.log");
var rs = fs.createReadStream("0xbfc40000-0xbffffff0.log");
var line = 0;
function tohex(n) {
var out = n.toString(16);
return out;
rs.on("error", console.log.bind(console));
rs.on("data", function(data) {
line += 16;
ws.write(data.toString().replace(/......../, tohex(line)));
rs.on("end", function() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment