decoder.js
function decodeDeltaArrayInt( bundle, database, len, num_type ) {
	var fromType = NUMTYPE_DELTA_INT.FROM[ num_type ],
		ans = new NUMTYPE_CLASS[ fromType ]( len ), v=0;

	// readTypedNum(fromType)
	switch (fromType) {
		case 0: v = bundle.u8[bundle.i8++]; break;
		case 1: v = bundle.s8[bundle.i8++]; break;
		case 2: v = bundle.u16[bundle.i16++]; break;
		case 3: v = bundle.s16[bundle.i16++]; break;
		case 4: v = bundle.u32[bundle.i32++]; break;
		case 5: v = bundle.s32[bundle.i32++]; break;
		case 6: v = bundle.f32[bundle.i32++]; break;
		case 7: v = bundle.f64[bundle.i64++]; break;
	}

	var values = bundle.readTypedArray( NUMTYPE_DELTA_INT.TO[ num_type ] , len - 1 );

	// Decode array
	ans[0] = v;
	for (var i=0, llen=values.length; i<llen; ++i) {
		v += values[i];
		ans[i+1] = v;
	}

	// Return
	return DEBUG
		? __debugMeta( ans, 'array.delta.int', {} )
		: ans;
}
function decodeDeltaArrayInt( bundle, database, len, num_type ) {
	var fromType = NUMTYPE_DELTA_INT.FROM[ num_type ],
		ans = new NUMTYPE_CLASS[ fromType ]( len ), v=0;

	// readTypedNum(fromType)
	switch (fromType) {
		case 0: v = bundle.u8[bundle.i8++]; break;
		case 1: v = bundle.s8[bundle.i8++]; break;
		case 2: v = bundle.u16[bundle.i16++]; break;
		case 3: v = bundle.s16[bundle.i16++]; break;
		case 4: v = bundle.u32[bundle.i32++]; break;
		case 5: v = bundle.s32[bundle.i32++]; break;
		case 6: v = bundle.f32[bundle.i32++]; break;
		case 7: v = bundle.f64[bundle.i64++]; break;
	}

	var values = bundle.readTypedArray( NUMTYPE_DELTA_INT.TO[ num_type ] , len - 1 );

	// Decode array
	ans[0] = v;
	for (var i=0, llen=values.length; i<llen; ++i) {
		v += values[i];
		ans[i+1] = v;
	}

	// Return
	return DEBUG
		? __debugMeta( ans, 'array.delta.int', {} )
		: ans;
}
function decodeDeltaArrayInt ( bundle , database , len , num_type ) { var fromType = NUMTYPE_DELTA_INT . FROM [ num_type ] , ans = new NUMTYPE_CLASS [ fromType ] ( len ) , v = 0 ; // readTypedNum(fromType) switch ( fromType ) { case 0 : v = bundle . u8 [ bundle . i8 ++ ] ; break ; case 1 : v = bundle . s8 [ bundle . i8 ++ ] ; break ; case 2 : v = bundle . u16 [ bundle . i16 ++ ] ; break ; case 3 : v = bundle . s16 [ bundle . i16 ++ ] ; break ; case 4 : v = bundle . u32 [ bundle . i32 ++ ] ; break ; case 5 : v = bundle . s32 [ bundle . i32 ++ ] ; break ; case 6 : v = bundle . f32 [ bundle . i32 ++ ] ; break ; case 7 : v = bundle . f64 [ bundle . i64 ++ ] ; break ; } var values = bundle . readTypedArray ( NUMTYPE_DELTA_INT . TO [ num_type ] , len - 1 ) ; // Decode array ans [ 0 ] = v ; for ( var i = 0 , llen = values . length ; i < llen ; ++ i ) { v += values [ i ] ; ans [ i + 1 ] = v ; } // Return return DEBUG ? __debugMeta ( ans , 'array.delta.int' , { } ) : ans ; }
Decode delta-encoded float array
Decode delta - encoded float array