ntoh.js 254 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 /** * Convert network-order (big-endian) bytes into their little-endian * representation. */ const ntoh = function(word) { return (word << 24) | ((word & 0xff00) << 8) | ((word & 0xff0000) >> 8) | (word >>> 24); }; export default ntoh;