big-endian or motorola format.
502804
public static void writeLongBigEndian(byte[] buffer, int offset, long value) {
		buffer[offset++] = (byte)((value >> 56) & 0xFF);
		buffer[offset++] = (byte)((value >> 48) & 0xFF);
		buffer[offset++] = (byte)((value >> 40) & 0xFF);
		buffer[offset++] = (byte)((value >> 32) & 0xFF);
		buffer[offset++] = (byte)((value >> 24) & 0xFF);
		buffer[offset++] = (byte)((value >> 16) & 0xFF);
		buffer[offset++] = (byte)((value >> 8) & 0xFF);
		buffer[offset] = (byte)(value & 0xFF);
	}
888673
def _detect_endian(cls, stream):
        
        stream.seek(0)
        endian_str = stream.read(2)
        return BIG_ENDIAN if endian_str == b'MM' else LITTLE_ENDIAN
262042
def lower_endian_to_number(l, base):
  """"""
  return sum([d * (base**i) for i, d in enumerate(l)])
304648
def _endian(self) -> str:
        '''
        
        '''
        if (self._encoding == 1 or self._encoding == 2 or self._encoding == 5 or
            self._encoding == 7 or self._encoding == 9 or self._encoding == 11 or
                self._encoding == 12):
            return 'big-endian'
        else:
            return 'little-endian'
560359
function Get16u($val, $by)
    {
        if ($this->MotorolaOrder)
        {
            return ((ord($val) << 8) | ord($by));
        }
        else
        {
            return ((ord($by) << 8) | ord($val));
        }
    }
67053
public static void writeUnsignedIntegerBigEndian(IO.WritableByteStream io, long value) throws IOException {
		io.write((byte)((value >> 24) & 0xFF));
		io.write((byte)((value >> 16) & 0xFF));
		io.write((byte)((value >> 8) & 0xFF));
		io.write((byte)(value & 0xFF));
	}
532711
public static void writeUnsignedShortBigEndian(ByteBuffer io, int value) {
		io.put((byte)((value >> 8) & 0xFF));
		io.put((byte)(value & 0xFF));
	}
1288138
def _jnzero32(ins):
    
    value = ins.quad[1]
    if is_int(value):
        if int(value) != 0:
            return ['jp %s' % str(ins.quad[2])]  # Always true
        else:
            return []

    output = _32bit_oper(value)
    output.append('ld a, h')
    output.append('or l')
    output.append('or e')
    output.append('or d')
    output.append('jp nz, %s' % str(ins.quad[2]))
    return output
348570
public final void fist(Mem dst)
  {
    assert(dst.size() == 2 || dst.size() == 4);
    emitX86(INST_FIST, dst);
  }
26252
public static long toLong(byte[] b, int off, boolean littleEndian) {
		if (littleEndian) {
			return (toInt(b, off, LITTLE_ENDIAN) & 0xFFFFFFFFL) |
					((toInt(b, off + 4, LITTLE_ENDIAN) & 0xFFFFFFFFL) << 32);
		}
		return ((toInt(b, off, BIG_ENDIAN) & 0xFFFFFFFFL) << 32) |
				(toInt(b, off + 4, BIG_ENDIAN) & 0xFFFFFFFFL);
	}
636901
private static void intToBigEndian(final int value, final byte[] array, final int index) {
        array[index    ] = (byte) (value >> 24);
        array[index + 1] = (byte) (value >> 16);
        array[index + 2] = (byte) (value >>  8);
        array[index + 3] = (byte) (value      );
    }
1153937
def endianSwapU16(bytes):
    """"""
    for b in range(0, len(bytes), 2):
        bytes[b], bytes[b + 1] = bytes[b + 1], bytes[b]
    return bytes
1171088
function Get32s($val1, $val2, $val3, $val4)
    {
        $val1 = ord($val1);
        $val2 = ord($val2);
        $val3 = ord($val3);
        $val4 = ord($val4);

        if ($this->MotorolaOrder)
        {
            return (($val1 << 24) | ($val2 << 16) | ($val3 << 8) | ($val4 << 0));
        }
        else
        {
            return (($val4 << 24) | ($val3 << 16) | ($val2 << 8) | ($val1 << 0));
        }
    }
969905
private String format(double n) {
        NumberFormat nf = NumberFormat.getNumberInstance(Locale.ENGLISH);
        nf.setMaximumFractionDigits(1);
        nf.setGroupingUsed(false);
        return nf.format(n);
    }
785004
public void writeRawLittleEndian32(final int value) throws IOException {
    writeRawByte((value      ) & 0xFF);
    writeRawByte((value >>  8) & 0xFF);
    writeRawByte((value >> 16) & 0xFF);
    writeRawByte((value >> 24) & 0xFF);
  }
236708
public static long readLongBigEndian(byte[] buffer, int offset) {
		long value;
		value = ((long)(buffer[offset] & 0xFF)) << 56;
		value |= ((long)(buffer[offset + 1] & 0xFF)) << 48;
		value |= ((long)(buffer[offset + 2] & 0xFF)) << 40;
		value |= ((long)(buffer[offset + 3] & 0xFF)) << 32;
		value |= ((long)(buffer[offset + 4] & 0xFF)) << 24;
		value |= (buffer[offset + 5] & 0xFF) << 16;
		value |= (buffer[offset + 6] & 0xFF) << 8;
		value |= (buffer[offset + 7] & 0xFF);
		return value;
	}
637321
public static byte[] getBytesLittleEndian(long value) {
		byte[] b = new byte[8];
		b[0] = (byte)(value & 0xFF);
		b[1] = (byte)((value >> 8) & 0xFF);
		b[2] = (byte)((value >> 16) & 0xFF);
		b[3] = (byte)((value >> 24) & 0xFF);
		b[4] = (byte)((value >> 32) & 0xFF);
		b[5] = (byte)((value >> 40) & 0xFF);
		b[6] = (byte)((value >> 48) & 0xFF);
		b[7] = (byte)((value >> 56) & 0xFF);
		return b;
	}