Gets a unit of ``8`` bits from the input buffer.

        Args:
          self (JLink): the ``JLink`` instance
          offset (int): the offset (in bits) from which to start reading

        Returns:
          The integer read from the input buffer.
336002
def swd_read8(self, offset):
        
        value = self._dll.JLINK_SWD_GetU8(offset)
        return ctypes.c_uint8(value).value
428846
def readSB(self, bits):
        
        shift = 32 - bits
        return int32(self.readbits(bits) << shift) >> shift
119062
static long toInt(final byte[] buffer, final int initialOffset) {
        int offset = initialOffset;
        return (buffer[offset] << 24)
                + ((buffer[++offset] & 0xFF) << 16)
                + ((buffer[++offset] & 0xFF) << 8)
                + (buffer[++offset] & 0xFF);
    }
962935
def get_offset(cls, info):
        

        assert info.layer == 3

        if info.version == 1:
            if info.mode != 3:
                return 36
            else:
                return 21
        else:
            if info.mode != 3:
                return 21
            else:
                return 13
804758
static int getUnsignedMedium(ByteBuf buf, int offset) {
        return (buf.getByte(offset)     & 0xFF) << 16 |
               (buf.getByte(offset + 1) & 0xFF) <<  8 |
                buf.getByte(offset + 2) & 0xFF;
    }
78521
public int getInt(int offset)
  {
    byte []code = getCode();
    
    int b0 = code[offset + 0] & 0xff;
    int b1 = code[offset + 1] & 0xff;
    int b2 = code[offset + 2] & 0xff;
    int b3 = code[offset + 3] & 0xff;
    
    return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  }
91175
function( buffer, offset ) {

    offset = offset || 0

    this.type = buffer.readUInt32BE( offset + 0 )
    this.description = Block.getDescription( this.type )
    this.comment = buffer.toString( 'ascii', offset + 4, offset + 8 ).replace( /\u0000/g, '' )
    this.sectorNumber = uint64.readBE( buffer, offset + 8, 8 )
    this.sectorCount = uint64.readBE( buffer, offset + 16, 8 )
    this.compressedOffset = uint64.readBE( buffer, offset + 24, 8 )
    this.compressedLength = uint64.readBE( buffer, offset + 32, 8 )

    return this

  }
310732
protected int readFully(InputStream in, byte buffer[], int offset, int len)
        throws java.io.IOException {
        for (int i = 0; i < len; i++) {
            int q = in.read();
            if (q == -1)
                return ((i == 0) ? -1 : i);
            buffer[i+offset] = (byte)q;
        }
        return len;
    }
1041552
public static int readUnsignedInt(byte[] bytes, int offset) {
      byte b = bytes[offset++];
      int i = b & 0x7F;
      for (int shift = 7; (b & 0x80) != 0; shift += 7) {
         b = bytes[offset++];
         i |= (b & 0x7FL) << shift;
      }
      return i;
   }
427445
def get_int(self):
        
        byte = self.get_bytes(1)
        if byte == max_byte:
            return util.inflate_long(self.get_binary())
        byte += self.get_bytes(3)
        return struct.unpack('>I', byte)[0]
1218606
private static byte readByte(boolean[] rawbits, int startIndex) {
    int n = rawbits.length - startIndex;
    if (n >= 8) {
      return (byte) readCode(rawbits, startIndex, 8);
    }
    return (byte) (readCode(rawbits, startIndex, n) << (8 - n));
  }
1315589
def _readbin(self, length, start):
        """"""
        if not length:
            return ''
        # Get the byte slice containing our bit slice
        startbyte, startoffset = divmod(start + self._offset, 8)
        endbyte = (start + self._offset + length - 1) // 8
        b = self._datastore.getbyteslice(startbyte, endbyte + 1)
        # Convert to a string of '0' and '1's (via a hex string an and int!)
        try:
            c = "{:0{}b}".format(int(binascii.hexlify(b), 16), 8*len(b))
        except TypeError:
            # Hack to get Python 2.6 working
            c = "{0:0{1}b}".format(int(binascii.hexlify(str(b)), 16), 8*len(b))
        # Finally chop off any extra bits.
        return c[startoffset:startoffset + length]
788781
private static int extractInt(byte[] arr, int offset) {
        return ((arr[offset] & 0xFF) << 24) | ((arr[offset + 1] & 0xFF) << 16) | ((arr[offset + 2] & 0xFF) << 8)
                | (arr[offset + 3] & 0xFF);
    }
682041
def _read_as_int(self, addr, numBytes):
        """"""
        buf = self.read_register(addr, numBytes)
        if len(buf) >= 4:
            return struct.unpack_from("<i", buf)[0]
        else:
            rtn = 0
            for i, byte in enumerate(buf):
                rtn |= byte << 8 * i
            return rtn
83151
@Override
	public int readBit() {
		if (position >= size) throw new EndOfBitStreamException();
		int k = (ints[(int)(position >> 5)] >> (31 - (((int)position) & 31))) & 1;
		position++;
		return k;
	}
40754
def read_byte(self, base, offset=0):
        
        fmt = 'B'
        return self._read_int(fmt, base, offset)
473433
private int loadNextByteInBuffer() throws IOException {
    final int value = this.readByteFromStream();
    if (value < 0) {
      return value;
    }

    this.bitBuffer = value;
    this.bitsInBuffer = 8;

    return value;
  }