encoder.js
function encodeArray_NUM_SHORT( encoder, data, n_type ) {

	//
	// Short Numeric Array (NUM_SHORT)
	//
	// .....  ...
	// 01110 [TYPE]
	//

	encoder.counters.arr_num_short+=1;
	encoder.log(LOG.ARR, "array.numeric.short, len="+data.length+
		", type="+_NUMTYPE[n_type]+" ("+n_type+")");

	// Encode primitives one after the other
	encoder.stream8.write( pack1b( ARR_OP.NUM_SHORT | n_type ) );
	encoder.stream8.write( pack1b( data.length, false ) );
	encoder.counters.arr_hdr+=2;

	// Encode the short array
	pickStream( encoder, n_type )
		.write( packTypedArray( convertArray( data, n_type ) ) );

}
function encodeArray_NUM_SHORT( encoder, data, n_type ) {

	//
	// Short Numeric Array (NUM_SHORT)
	//
	// .....  ...
	// 01110 [TYPE]
	//

	encoder.counters.arr_num_short+=1;
	encoder.log(LOG.ARR, "array.numeric.short, len="+data.length+
		", type="+_NUMTYPE[n_type]+" ("+n_type+")");

	// Encode primitives one after the other
	encoder.stream8.write( pack1b( ARR_OP.NUM_SHORT | n_type ) );
	encoder.stream8.write( pack1b( data.length, false ) );
	encoder.counters.arr_hdr+=2;

	// Encode the short array
	pickStream( encoder, n_type )
		.write( packTypedArray( convertArray( data, n_type ) ) );

}
function encodeArray_NUM_SHORT ( encoder , data , n_type ) { // // Short Numeric Array (NUM_SHORT) // // .....  ... // 01110 [TYPE] // encoder . counters . arr_num_short += 1 ; encoder . log ( LOG . ARR , "array.numeric.short, len=" + data . length + ", type=" + _NUMTYPE [ n_type ] + " (" + n_type + ")" ) ; // Encode primitives one after the other encoder . stream8 . write ( pack1b ( ARR_OP . NUM_SHORT | n_type ) ) ; encoder . stream8 . write ( pack1b ( data . length , false ) ) ; encoder . counters . arr_hdr += 2 ; // Encode the short array pickStream ( encoder , n_type ) . write ( packTypedArray ( convertArray ( data , n_type ) ) ) ; }
Encode array data as short typed
Encode array data as short typed