Given a buffer and offset, returns the parsed value and new offset.

        Parses the ``size_primitive`` first to determine how many more bytes to
        consume to extract the value.
433200
def parse(cls, buff, offset):
        
        size, offset = cls.size_primitive.parse(buff, offset)
        if size == -1:
            return None, offset

        var_struct = struct.Struct("!%ds" % size)

        value = var_struct.unpack_from(buff, offset)[0]
        value = cls.parse_value(value)
        offset += var_struct.size

        return value, offset
693999
def readBuffer(self, newLength):
        
        result = Buffer(self.buf, self.offset, newLength)
        self.skip(newLength)
        return result
883232
def __fill_buffer(self, size=0):
    
    read_size = min(max(size, self.__buffer_size), MAX_BLOB_FETCH_SIZE)

    self.__buffer = fetch_data(self.__blob_key, self.__position,
                               self.__position + read_size - 1)
    self.__buffer_position = 0
    self.__eof = len(self.__buffer) < read_size
948874
def _single_load(self, addr, offset, size, inspect=True, events=True):
        
        try:
            d = self._contents[addr]
        except KeyError:
            d = self._handle_uninitialized_read(addr, inspect=inspect, events=events)
            self._contents[addr] = d

        if offset == 0 and size == self.width:
            return d
        else:
            return d.get_bytes(offset, size)
755372
def read_inverse(self, value, size):
        
        addr_candidates = [addr for addr, val in self._memory.items() if val == (value & 0xff)]
        addr_matches = []

        for addr in addr_candidates:
            match = True

            for i in range(0, size):
                byte_curr = (value >> (i * 8)) & 0xff
                try:
                    match = self._memory[addr + i] == byte_curr
                except KeyError:
                    match = False

                if not match:
                    break

            if match:
                addr_matches += [addr]

        return addr_matches
274025
def _read_offset_value(self, f, offset, size):
        '''
        
        '''
        f.seek(offset, 0)
        if (size == 8):
            return int.from_bytes(f.read(8), 'big', signed=True)
        else:
            return int.from_bytes(f.read(4), 'big', signed=True)
625148
private void newBuffer(int offset) {
    if (maxBufferSize >= 0) {
      buffer = new int[maxBufferSize];
      isByte = new boolean[maxBufferSize];
      bufferOffset = offset;
      currentBufferSize = 0;
    }
  }
52007
static long getLong(byte[] buffer, int offset) {
        return (buffer[offset] & 0xffL) << 56 | (buffer[offset + 1] & 0xffL) << 48 | (buffer[offset + 2] & 0xffL) << 40
                | (buffer[offset + 3] & 0xffL) << 32 | (buffer[offset + 4] & 0xffL) << 24
                | (buffer[offset + 5] & 0xffL) << 16 | (buffer[offset + 6] & 0xffL) << 8 | (buffer[offset + 7] & 0xffL);
    }
366620
def parse(buf)
      n, count = 0, 0
      while n < buf.size
        key_size, value_size = buf[n, 8].unpack('NN')
        data_size = key_size + 8
        data_size += value_size if value_size != DELETE
        data = buf[n, data_size]
        n += data_size
        raise 'CRC mismatch: your data might be corrupted!' unless buf[n, 4] == crc32(data)
        n += 4
        yield(value_size == DELETE ? [data[8, key_size]] : [data[8, key_size], data[8 + key_size, value_size]])
        count += 1
      end
      count
    end
783487
private int findFrameSizeValueLength(final ByteBuf buffer) {
        final int readerIndex = buffer.readerIndex();
        int index = buffer.forEachByte(BYTE_PROCESSOR);

        if (index >= 0) {
            return index - readerIndex;
        } else {
            return -1;
        }
    }
415554
def read(self, size=sys.maxsize):
        
        blob_size = int(self.blob_properties.get('content-length'))
        if self._pointer < blob_size:
            chunk = self._download_chunk_with_retries(
                chunk_offset=self._pointer, chunk_size=size)
            self._pointer += size
            return chunk
330337
function readVarInt (buffer, offset) {
  const result = varuint.decode(buffer, offset);

  return {
    number: result,
    size: varuint.decode.bytes
  };
}
484274
def read(self, offset, length):
        
        self._file.seek(offset)
        return self._file.read(length)
1300531
def frombytes(self, bytes, offset=0):
        
        for b in bytes:
            self._buf[offset] = b
            offset += 1
791272
def read1(self, size=-1):
        
        # Usually, read1() calls _fp.read() at most once. However, sometimes
        # this does not give enough data for the decompressor to make progress.
        # In this case we make multiple reads, to avoid returning b"".
        self._check_can_read()
        if size is None:
            #This is not needed on Python 3 where the comparison to zero
            #will fail with a TypeError. 
            raise TypeError("Read size should be an integer, not None")
        if (size == 0 or self._mode == _MODE_READ_EOF or
            not self._fill_buffer()):
            return b""
        if 0 < size < len(self._buffer):
            data = self._buffer[:size]
            self._buffer = self._buffer[size:]
        else:
            data = self._buffer
            self._buffer = None
        self._pos += len(data)
        return data
278482
def into_buffer(self, buf, offset):
    
    self.payload = containerize(exclude_fields(self))
    self.parser = MsgEphemerisGPSDepF._parser
    self.stream_payload.reset(buf, offset)
    return self.pack_into(buf, offset, self._build_payload)
225575
def parse(self, buffer, inlineparent = None):
        '''
        
        '''
        if len(buffer) < self.struct.size:
            return None
        try:
            return (self.struct.unpack(buffer[:self.struct.size])[0], self.struct.size)
        except struct.error as exc:
            raise BadFormatError(exc)