/** * Document-method: MessagePack::Unpacker#execute * * call-seq: * unpacker.unpack(data, offset) -> next offset * * Deserializes one object over the specified buffer from _offset_ bytes. * * This method doesn't use the internal buffer. * * Call *reset()* method before calling this method again. * * This returns offset that was parsed to. * Use *finished?* method to check an object is deserialized and call *data* * method if it returns true. * * UnpackError is throw when parse error is occured. */ static VALUE MessagePack_Unpacker_execute(VALUE self, VALUE data, VALUE off) { CHECK_STRING_TYPE(data); return MessagePack_Unpacker_execute_impl(self, data, (size_t)NUM2ULONG(off), (size_t)RSTRING_LEN(data)); }