encoder.js
function deltaEncodeIntegers( array, numType ) {
	var delta = new NUMTYPE_CLASS[numType]( array.length - 1 ), l = array[0];
	for (var i=1; i<array.length; ++i) {
		var v = array[i]; delta[i-1] = v - l; l = v;
	}
	return delta;
}
function deltaEncodeIntegers( array, numType ) {
	var delta = new NUMTYPE_CLASS[numType]( array.length - 1 ), l = array[0];
	for (var i=1; i<array.length; ++i) {
		var v = array[i]; delta[i-1] = v - l; l = v;
	}
	return delta;
}
function deltaEncodeIntegers ( array , numType ) { var delta = new NUMTYPE_CLASS [ numType ] ( array . length - 1 ) , l = array [ 0 ] ; for ( var i = 1 ; i < array . length ; ++ i ) { var v = array [ i ] ; delta [ i - 1 ] = v - l ; l = v ; } return delta ; }
Encode an integer array with delta encoding

@param {array} - Source Array
@param {Class} - The class of the underlaying numeric array (ex. Uint8Array)

@return {array} - An array with the initial value and the delta-encoded payload
Encode an integer array with delta encoding