Read the serialized object at +offset+ (in bytes) using
 Marshal.load.

 @return [Object]
431304
def get_object(offset)
      io = to_shm_io
      io.seek(offset)
      Marshal.load(io)
    end
470479
def read_class
      klass_name = read_string(cache: false)
      result = safe_const_get(klass_name)
      unless result.class == Class
        raise ArgumentError, "#{klass_name} does not refer to a Class"
      end
      @object_cache << result
      result
    end
1297551
def return_payload
      @value = @raw.map do |e|
        { name: e['Name'],
          payload: (Base64.decode64(e['Payload']) unless e['Payload'].nil?) }
      end
    end
418264
def read(bytes = @length)
      return nil if @pos >= @length
      bytes = @length - @pos if bytes.nil?
      bytes = @length - @pos if @pos + bytes > @length

      out = @data[@pos, bytes]      if @data.kind_of?(String)
      out = @data.read(bytes)       if @data.kind_of?(NTFS::DataRun)

      @pos += out.size
      out
    end
1065737
def read_hashes(self):
        
        var_len = self.read_var_int()
        items = []
        for _ in range(0, var_len):
            ba = bytearray(self.read_bytes(32))
            ba.reverse()
            items.append(ba.hex())
        return items
1080047
def gets(sep_string, length = nil)
      return read(length) if sep_string.nil?

      # Read more data until we get the sep_string
      while (index = @read_buffer.index(sep_string)).nil? && !@ios.eof?
        break if length && @read_buffer.length >= length

        read_block
      end
      index ||= -1
      data    = @read_buffer.slice!(0..index)
      @pos   += data.length
      return nil if data.empty? && eof?

      data
    end
343466
def read(self, bytes, offset):
        
        return Zchunk(lib.zfile_read(self._as_parameter_, bytes, offset), True)
746114
async def read(self, *, decode: bool=False) -> Any:
        
        if self._at_eof:
            return b''
        data = bytearray()
        while not self._at_eof:
            data.extend((await self.read_chunk(self.chunk_size)))
        if decode:
            return self.decode(data)
        return data
1153464
private int loadSparseBinaryOffsets(RandomAccessFile binarySSpace) 
            throws IOException {
        // Reader off the 4-byte header if it exists
        if (containsHeader) {
             int header = binarySSpace.readInt();
        }
        int rows = binarySSpace.readInt();
        int cols = binarySSpace.readInt();

        for (long row = 0; row < rows; ++row) {
            String word = binarySSpace.readUTF();
            termToOffset.put(word, binarySSpace.getFilePointer());
            
            // read and discard the rest of the vector
            int nonZero = binarySSpace.readInt();
            for (int i = 0; i < nonZero; ++i) {
                binarySSpace.readInt();
                binarySSpace.readDouble();
            }
        }
        return cols;
    }
624332
def loads(self, value):
    ''''''
    for serializer in reversed(self):
      value = serializer.loads(value)
    return value
1006902
def marshal_load(data)
      values, opts = data
      initialize(values[:id])
      initialize_from(values, opts)
    end
1118231
def read(self, size=-1):
    
    if size < 0:
      offset = len(self._buffer)
    else:
      offset = self._offset + size
    return self.read_to_offset(offset)
1317829
def read()
            size_a = @stream.read 2
            size = Common.decode_u16(size_a)
            data = @stream.read size

            data = MessagePack.unpack data
            class_ = Common.packet_from_id data[0]
            class_.new *data[1][0]
        end
1246332
private Object readDataField(int bytes, int datalen)
                    throws IOException,
                    ClassNotFoundException {

        Object value = null;

        deserializeTimer.reset();
        if (bytes == 0) { // yes, need to deserialize
            if ((databuf == null) || (databuf.length < datalen)) {
                databuf = new byte[datalen];
            }

            deserialize_time += deserializeTimer.elapsed(); // careful not to add physical i/o into time
            filemgr.read(databuf, 0, datalen); // read data
            deserializeTimer.reset();

            value = SerializationUtility.deserialize(Arrays.copyOf(databuf, datalen), htoddc.cacheName);
            bytes_deserialized += datalen; // we don't count application deserialzation

        } else {
            value = new byte[datalen]; // space for data
            deserialize_time += deserializeTimer.elapsed(); // avoid counting physical i/o
            filemgr.read((byte[]) value); // read data
            deserializeTimer.reset();
        }
        deserialize_time += deserializeTimer.elapsed();

        //
        // If static deserializion buffer bloats things get expensive.  Force 
        // reallocation if a huge object is read in.
        //
        if (datalen > 100000) {
            databuf = null;
        }

        return value;
    }
63538
def read(cls, filename, offset=None, encoding="iso-8859-1"):
        """"""
        with fileutil.opened(filename, "rb") as file:
            if offset is None:
                file.seek(-128, 2)
            else:
                file.seek(offset)
            data = file.read(128)
            return cls.decode(data, encoding=encoding)
6239
def readpartial(length = nil)
      if length.nil? && @buffer.length > 0
        slice = @buffer
        @buffer = ""
      else
        unless finished_reading? || (length && length <= @buffer.length)
          @connection.readpartial(length ? length - @buffer.length : @connection.buffer_size)
        end

        if length
          slice = @buffer.slice!(0, length)
        else
          slice = @buffer
          @buffer = ""
        end
      end

      slice && slice.length == 0 ? nil : slice
    end
507917
def read(read_len)
      # If we closed the connection, return nil without calling anything again to avoid EOF
      # or other errors
      return nil if @closed

      if @left_to_read
        # We hit the end of what we need to read, if this is a chunked request, then we need to check for the next chunk
        if @left_to_read <= read_len
          data = @socket.read(@left_to_read)
          @total_size += @left_to_read
          @left_to_read = nil
          @read_clfr = true
        # Reading from known buffer still
        else
          @left_to_read -= read_len
          @total_size += read_len
          data = @socket.read(read_len)
        end

      elsif @chunked
        # We finished reading the chunks, read the last 2 to get \r\n out of the way, and then find the next chunk
        if @read_clfr
          @read_clfr = nil
          @socket.read(2)
        end

        data, chunk_read = "", 0
        while true
          # Read first line to get the chunk length
          line = @socket.readline

          len = line.slice(/[0-9a-fA-F]+/) or raise Net::HTTPBadResponse.new("wrong chunk size line: #{line}")
          len = len.hex

          # Nothing left, read off the final \r\n
          if len == 0
            @socket.read(2)
            @socket.close
            @response.instance_variable_set(:@read, true)

            @closed = true
            break
          end

          # Reading this chunk will set us over the buffer amount
          # Read what we can of it (if anything), and send back what we have and queue a read for the rest
          if ( chunk_read + len ) > read_len
            can_read = len - ( ( chunk_read + len ) - read_len )

            @left_to_read = len - can_read
            @total_size += can_read

            data << @socket.read(can_read) if can_read > 0
            break
          # We can just return the chunk as-is
          else
            @total_size += len
            chunk_read += len

            data << @socket.read(len)
            @socket.read(2)
          end
        end

      # If we don't have a content length, then we need to keep reading until we run out of data
      elsif !@content_length
        data = @socket.readline

        @total_size += data.length if data
      end

      # We've finished reading, set this so Net::HTTP doesn't try and read it again
      if !data or data == ""
        @response.instance_variable_set(:@read, true)

        nil
      else
        if data.length >= @total_size and !@chunked
          @response.instance_variable_set(:@read, true)
        end

        if ENCODABLE and @encoding
          data = data.force_encoding(@encoding) if @encoding
          data = data.encode("UTF-8")
        end

        @digest.update(data)
        data
      end

    # Mark as read finished, return the last bits of data (if any)
    rescue EOFError
      @response.instance_variable_set(:@read, true)
      @socket.close
      @closed = true

      if data and data != ""
        @digest.update(data)
        data
      else
        nil
      end
    end