index.js
function streamMode( contents, options, callback ) {
	toArray(contents, function(err, chunks) {
		if (err) {
			callback(err);
			return;
		}
		bufferMode( Buffer.concat(chunks), options, function(err, encBuf, decBuf) {
			if (err) {
				callback(err);
				return;
			}

			var encStream = new Readable();
			encStream.push(encBuf);
			encStream.push(null);

			var decStream = new Readable();
			decStream.push(decBuf);
			decStream.push(null);

			// Callback streams
			callback(null, encStream, decStream);
		});
	});
}
function streamMode( contents, options, callback ) {
	toArray(contents, function(err, chunks) {
		if (err) {
			callback(err);
			return;
		}
		bufferMode( Buffer.concat(chunks), options, function(err, encBuf, decBuf) {
			if (err) {
				callback(err);
				return;
			}

			var encStream = new Readable();
			encStream.push(encBuf);
			encStream.push(null);

			var decStream = new Readable();
			decStream.push(decBuf);
			decStream.push(null);

			// Callback streams
			callback(null, encStream, decStream);
		});
	});
}
function streamMode ( contents , options , callback ) { toArray ( contents , function ( err , chunks ) { if ( err ) { callback ( err ) ; return ; } bufferMode ( Buffer . concat ( chunks ) , options , function ( err , encBuf , decBuf ) { if ( err ) { callback ( err ) ; return ; } var encStream = new Readable ( ) ; encStream . push ( encBuf ) ; encStream . push ( null ) ; var decStream = new Readable ( ) ; decStream . push ( decBuf ) ; decStream . push ( null ) ; // Callback streams callback ( null , encStream , decStream ) ; } ) ; } ) ; }
Read entire stream and process
Read entire stream and process