Read a 64-bit little-endian integer from the internal byte buffer.
328857
public long readRawLittleEndian64() throws IOException
    {
        // final byte[] buffer = this.buffer;
        // int offset = this.offset;

        final byte[] bs = new byte[8];
        buffer.get(bs);

        // final byte b1 = buffer[offset++];
        // final byte b2 = buffer[offset++];
        // final byte b3 = buffer[offset++];
        // final byte b4 = buffer[offset++];
        // final byte b5 = buffer[offset++];
        // final byte b6 = buffer[offset++];
        // final byte b7 = buffer[offset++];
        // final byte b8 = buffer[offset++];
        //
        // this.offset = offset;

        return (((long) bs[0] & 0xff)) |
                (((long) bs[1] & 0xff) << 8) |
                (((long) bs[2] & 0xff) << 16) |
                (((long) bs[3] & 0xff) << 24) |
                (((long) bs[4] & 0xff) << 32) |
                (((long) bs[5] & 0xff) << 40) |
                (((long) bs[6] & 0xff) << 48) |
                (((long) bs[7] & 0xff) << 56);
    }
217946
def read32(bytestream):
  """"""
  dt = np.dtype(np.uint32).newbyteorder('>')
  return np.frombuffer(bytestream.read(4), dtype=dt)[0]
807915
public static void writeUnsignedIntegerLittleEndian(byte[] buffer, int offset, long value) {
		buffer[offset++] = (byte)(value & 0xFF);
		buffer[offset++] = (byte)((value >> 8) & 0xFF);
		buffer[offset++] = (byte)((value >> 16) & 0xFF);
		buffer[offset] = (byte)((value >> 24) & 0xFF);
	}
931893
public static void writeLongLittleEndian(ByteBuffer io, long value) {
		io.put((byte)(value & 0xFF));
		io.put((byte)((value >> 8) & 0xFF));
		io.put((byte)((value >> 16) & 0xFF));
		io.put((byte)((value >> 24) & 0xFF));
		io.put((byte)((value >> 32) & 0xFF));
		io.put((byte)((value >> 40) & 0xFF));
		io.put((byte)((value >> 48) & 0xFF));
		io.put((byte)((value >> 56) & 0xFF));
	}
16132
public static int readUnsignedShortLittleEndian(InputStream io) throws IOException {
		int value = io.read();
		if (value < 0) throw new EOFException();
		int i = io.read();
		if (i < 0) throw new EOFException();
		return value | (i << 8);
	}
292213
def read_uint(self):
		
		if self.reader.sysinfo.ProcessorArchitecture == PROCESSOR_ARCHITECTURE.AMD64:
			return int.from_bytes(self.read(8), byteorder = 'little', signed = False)
		else:
			return int.from_bytes(self.read(4), byteorder = 'little', signed = False)
809760
public static int readLittleEndianInt(DataInput in) throws IOException {
		int bigEndian = 0;
		for (int shiftBy = 0; shiftBy < 32; shiftBy += 8) {
			bigEndian |= (in.readUnsignedByte() & 0xff) << shiftBy;
		}
		return bigEndian;
	}
40754
def read_byte(self, base, offset=0):
        
        fmt = 'B'
        return self._read_int(fmt, base, offset)
773232
def _readuint(self, length, start):
        """"""
        if not length:
            raise InterpretError("Cannot interpret a zero length bitstring "
                                           "as an integer.")
        offset = self._offset
        startbyte = (start + offset) // 8
        endbyte = (start + offset + length - 1) // 8

        b = binascii.hexlify(bytes(self._datastore.getbyteslice(startbyte, endbyte + 1)))
        assert b
        i = int(b, 16)
        final_bits = 8 - ((start + offset + length) % 8)
        if final_bits != 8:
            i >>= final_bits
        i &= (1 << length) - 1
        return i
790830
def read_int16(self, little_endian=True):
        
        if little_endian:
            endian = "<"
        else:
            endian = ">"
        return self.unpack('%sh' % endian, 2)
1252618
def read(self, n):
        ''''''
        bytes_wanted = n - self.buffer_length + self.pos + 1
        if bytes_wanted > 0:
            self._buffer_bytes(bytes_wanted)

        end_pos = self.pos + n
        ret = self.buffer[self.pos + 1:end_pos + 1]
        self.pos = end_pos
        return ret
1190107
private static int readLen16(ByteBuffer buffer) {
        int len = 0;
        int i = Buffers.readUShort(buffer);
        if ((i & 0x8000) != 0) {
            len |= (i & 0x7fff) << 16;
            len += Buffers.readUShort(buffer);
        } else {
            len = i;
        }
        return len;
    }
741715
def write_uint64(self, value, little_endian=True):
        
        if little_endian:
            endian = "<"
        else:
            endian = ">"
        return self.pack('%sQ' % endian, value)
1115286
private static int readFully(InputStream in, ByteArrayOutputStream bout,
            int length) throws IOException {
        int read = 0;
        byte[] buffer = new byte[2048];
        while (length > 0) {
            int n = in.read(buffer, 0, length<2048?length:2048);
            if (n <= 0) {
                break;
            }
            bout.write(buffer, 0, n);
            read += n;
            length -= n;
        }
        return read;
    }
281299
private int readShort(InputStream in, CRC32 crc) throws IOException {
        int b = readByte(in, crc);
        return ((readByte(in, crc) << 8) & 0x00ff00) | b;
    }
366570
public static long readLong(byte[] bytes, int start) {
        return ((long) (readInt(bytes, start)) << 32) +
            (readInt(bytes, start + 4) & 0xFFFFFFFFL);
    }
841048
def read_short(self, base, offset=0):
        
        fmt = b'<H' if self._byte_order is LITTLE_ENDIAN else b'>H'
        return self._read_int(fmt, base, offset)