Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 616 Bytes

README.md

File metadata and controls

38 lines (31 loc) · 616 Bytes

js-uuencode

UUEncode Library for Javascript

Usage: Command line ./bin/uuencode input output ./bin/uudecode input ouput

Streams

var uuencode = require ('uuencode');
var fs = require ('fs');

var inFile = './data/test.raw';

function test(){
    data = "";
    var infs = fs.createReadStream(inFile)
	.on('open', function (){
	    infs
		.pipe(new uuencode({encoder: true}))
		.on('data', function (d){
		})
		.pipe(new uuencode({decoder: true}))
		.on('data', function (d){
		    data += d;
		})
		.on('end', function () {
		    console.log(data);
		});
	})
    };

test();