decoder.js
function decodePlainBulkArray( bundle, database ) {

	// Get signature ID
	var sid = bundle.u16[bundle.i16++],
		properties = bundle.signature_table[sid],
		factory = bundle.factory_plain_bulk[sid];

	// Check for invalid objects
	if (factory === undefined)
		throw new Errors.AssertError('Could not found simple object signature with id #'+sid+'!');

	// Read property arrays
	var values = decodePrimitive( bundle, database );

	// Create objects
	var len=values.length/properties.length, ans = new Array(len);
	for (var i=0; i<len; ++i)
		ans[i] = factory(values, i);

	return DEBUG
		? __debugMeta( ans, 'array.primitive.bulk_plain', { 'sid': sid } )
		: ans;
	
}
function decodePlainBulkArray( bundle, database ) {

	// Get signature ID
	var sid = bundle.u16[bundle.i16++],
		properties = bundle.signature_table[sid],
		factory = bundle.factory_plain_bulk[sid];

	// Check for invalid objects
	if (factory === undefined)
		throw new Errors.AssertError('Could not found simple object signature with id #'+sid+'!');

	// Read property arrays
	var values = decodePrimitive( bundle, database );

	// Create objects
	var len=values.length/properties.length, ans = new Array(len);
	for (var i=0; i<len; ++i)
		ans[i] = factory(values, i);

	return DEBUG
		? __debugMeta( ans, 'array.primitive.bulk_plain', { 'sid': sid } )
		: ans;
	
}
function decodePlainBulkArray ( bundle , database ) { // Get signature ID var sid = bundle . u16 [ bundle . i16 ++ ] , properties = bundle . signature_table [ sid ] , factory = bundle . factory_plain_bulk [ sid ] ; // Check for invalid objects if ( factory === undefined ) throw new Errors . AssertError ( 'Could not found simple object signature with id #' + sid + '!' ) ; // Read property arrays var values = decodePrimitive ( bundle , database ) ; // Create objects var len = values . length / properties . length , ans = new Array ( len ) ; for ( var i = 0 ; i < len ; ++ i ) ans [ i ] = factory ( values , i ) ; return DEBUG ? __debugMeta ( ans , 'array.primitive.bulk_plain' , { 'sid' : sid } ) : ans ; }
Decode plain bulk array
Decode plain bulk array