def read_user_marshal
      klass_name = read(cache: false)
      klass = safe_const_get(klass_name)

      result = klass.allocate
      @object_cache << result

      data = read(cache: false)
      result.marshal_load(data)
      result
    end
def read_user_marshal
      klass_name = read(cache: false)
      klass = safe_const_get(klass_name)

      result = klass.allocate
      @object_cache << result

      data = read(cache: false)
      result.marshal_load(data)
      result
    end
Reads a 'User Marshal' object that has 'marshal_dump/marshal_load' methods

 @example
   class UserMarshal < Struct.new(:a, :b)
     def marshal_dump
       [a, b]
     end

     def marshal_load(data)
       self.a, self.b = data
     end
   end

   UserMarshal.new(100, 200)
 is encoded as
   'U', :UserMarshal, [100, 200]

 To load it back `UserMarshal.allocate` and `UserMarshal#marshal_load` must be called