export const enum Endianness { LITTLE_ENDIAN , BIG_ENDIAN } const test = new Uint16Array ( [ 0xFEFF ] ) ; const testView = new DataView ( test . buffer ) ; const systemEndianness = ( testView . getUint8 ( 0 ) == 0xFF ) ? Endianness . LITTLE_ENDIAN : Endianness . BIG_ENDIAN ; export function getSystemEndianness ( ) { return systemEndianness ; }