gravity.js
function joinBuffers(buffers) {
		var
			i = -1, j = -1,
			num = buffers.length,
			totalBytes = 0,
			bytesWritten = 0,
			buff,
			superBuff
		;
		while (++i < num) {
			totalBytes += buffers[i].length;
		}
		superBuff = new Buffer(totalBytes);
		while (++j < num) {
			buff = buffers[j];
			buff.copy(superBuff, bytesWritten, 0);
			bytesWritten += buff.length;
		}
		return superBuff;
	}
function joinBuffers(buffers) {
		var
			i = -1, j = -1,
			num = buffers.length,
			totalBytes = 0,
			bytesWritten = 0,
			buff,
			superBuff
		;
		while (++i < num) {
			totalBytes += buffers[i].length;
		}
		superBuff = new Buffer(totalBytes);
		while (++j < num) {
			buff = buffers[j];
			buff.copy(superBuff, bytesWritten, 0);
			bytesWritten += buff.length;
		}
		return superBuff;
	}
function joinBuffers ( buffers ) { var i = - 1 , j = - 1 , num = buffers . length , totalBytes = 0 , bytesWritten = 0 , buff , superBuff ; while ( ++ i < num ) { totalBytes += buffers [ i ] . length ; } superBuff = new Buffer ( totalBytes ) ; while ( ++ j < num ) { buff = buffers [ j ] ; buff . copy ( superBuff , bytesWritten , 0 ) ; bytesWritten += buff . length ; } return superBuff ; }
Concatentate an array of Buffers into a single one.
Concatentate an array of Buffers into a single one .