- blob = new_blob_descriptor();
- if (!blob)
- return WIMLIB_ERR_NOMEM;
-
- blob_set_is_located_in_wim_resource(blob, &rdesc);
- blob->flags = rdesc.flags;
- blob->size = rdesc.uncompressed_size;
- blob->offset_in_res = 0;
-
- ret = read_full_blob_into_alloc_buf(blob, buf_ret);
-
- blob_unset_is_located_in_wim_resource(blob);
- free_blob_descriptor(blob);
- return ret;