encoder.js
function sizeOfType(t) {
	switch (t) {
		case NUMTYPE.UINT8:
		case NUMTYPE.INT8:
			return 1;
		case NUMTYPE.UINT16:
		case NUMTYPE.INT16:
			return 2;
		case NUMTYPE.UINT32:
		case NUMTYPE.INT32:
		case NUMTYPE.FLOAT32:
			return 4;
		case NUMTYPE.FLOAT64:
			return 8;
	}
	return 255;
}
function sizeOfType(t) {
	switch (t) {
		case NUMTYPE.UINT8:
		case NUMTYPE.INT8:
			return 1;
		case NUMTYPE.UINT16:
		case NUMTYPE.INT16:
			return 2;
		case NUMTYPE.UINT32:
		case NUMTYPE.INT32:
		case NUMTYPE.FLOAT32:
			return 4;
		case NUMTYPE.FLOAT64:
			return 8;
	}
	return 255;
}
function sizeOfType ( t ) { switch ( t ) { case NUMTYPE . UINT8 : case NUMTYPE . INT8 : return 1 ; case NUMTYPE . UINT16 : case NUMTYPE . INT16 : return 2 ; case NUMTYPE . UINT32 : case NUMTYPE . INT32 : case NUMTYPE . FLOAT32 : return 4 ; case NUMTYPE . FLOAT64 : return 8 ; } return 255 ; }
Return the array size in bytes of the specified type

@param {int} t - The NUMTYPE type to check
@returns {int} - Returns the size in bytes to hold this type
Return the array size in bytes of the specified type