decoder.js
function decodePivotArrayFloat( bundle, database, len, num_type ) {
	var ans = new NUMTYPE_CLASS[ NUMTYPE_DELTA_FLOAT.FROM[ num_type ] ]( len ),
		// pivot = bundle.readTypedNum( NUMTYPE_DELTA_FLOAT.FROM[ num_type ] ), 
		scale = bundle.readFloat64(),
		values = bundle.readTypedArray( NUMTYPE_DELTA_FLOAT.TO[ num_type ] , len );

	// console.log(">> DELTA_FLOAT len=",len,"type=",num_type,"scale=",scale,"pivot=",pivot);

	// Decode
	for (var i=0; i<len; ++i) {
		ans[i] = pivot + (values[i] * scale);
		// console.log("<<<", values[i],"->", ans[i]);
	}

	return DEBUG
		? __debugMeta( ans, 'array.delta.float', {} )
		: ans;
}
function decodePivotArrayFloat( bundle, database, len, num_type ) {
	var ans = new NUMTYPE_CLASS[ NUMTYPE_DELTA_FLOAT.FROM[ num_type ] ]( len ),
		// pivot = bundle.readTypedNum( NUMTYPE_DELTA_FLOAT.FROM[ num_type ] ), 
		scale = bundle.readFloat64(),
		values = bundle.readTypedArray( NUMTYPE_DELTA_FLOAT.TO[ num_type ] , len );

	// console.log(">> DELTA_FLOAT len=",len,"type=",num_type,"scale=",scale,"pivot=",pivot);

	// Decode
	for (var i=0; i<len; ++i) {
		ans[i] = pivot + (values[i] * scale);
		// console.log("<<<", values[i],"->", ans[i]);
	}

	return DEBUG
		? __debugMeta( ans, 'array.delta.float', {} )
		: ans;
}
function decodePivotArrayFloat ( bundle , database , len , num_type ) { var ans = new NUMTYPE_CLASS [ NUMTYPE_DELTA_FLOAT . FROM [ num_type ] ] ( len ) , // pivot = bundle.readTypedNum( NUMTYPE_DELTA_FLOAT.FROM[ num_type ] ),  scale = bundle . readFloat64 ( ) , values = bundle . readTypedArray ( NUMTYPE_DELTA_FLOAT . TO [ num_type ] , len ) ; // console.log(">> DELTA_FLOAT len=",len,"type=",num_type,"scale=",scale,"pivot=",pivot); // Decode for ( var i = 0 ; i < len ; ++ i ) { ans [ i ] = pivot + ( values [ i ] * scale ) ; // console.log("<<<", values[i],"->", ans[i]); } return DEBUG ? __debugMeta ( ans , 'array.delta.float' , { } ) : ans ; }
Decode pivot-encoded float array
Decode pivot - encoded float array