+skip_wim_resource(struct wim_resource_descriptor *rdesc);
+
+/*
+ * Type of callback function for beginning to read a blob.
+ *
+ * @blob:
+ * Blob that is about to be read.
+ *
+ * @ctx:
+ * User-provided context.
+ *
+ * Must return 0 on success, a positive error code on failure, or the special
+ * value BEGIN_BLOB_STATUS_SKIP_BLOB to indicate that the blob should not be
+ * read, and read_blob_list() should continue on to the next blob (without
+ * calling @consume_chunk or @end_blob).
+ */
+typedef int (*read_blob_list_begin_blob_t)(struct blob_descriptor *blob, void *ctx);
+
+#define BEGIN_BLOB_STATUS_SKIP_BLOB -1
+
+/*
+ * Type of callback function for finishing reading a blob.
+ *
+ * @blob:
+ * Blob that has been fully read, or blob that started being read but could
+ * not be fully read due to a read error.
+ *
+ * @status:
+ * 0 if reading the blob was successful; otherwise a nonzero error code
+ * that specifies the return status.
+ *
+ * @ctx:
+ * User-provided context.
+ */
+typedef int (*read_blob_list_end_blob_t)(struct blob_descriptor *blob,
+ int status,
+ void *ctx);
+
+
+/* Callback functions and contexts for read_blob_list(). */
+struct read_blob_list_callbacks {
+
+ /* Called when a blob is about to be read. */
+ read_blob_list_begin_blob_t begin_blob;
+
+ /* Called when a chunk of data has been read. */
+ consume_data_callback_t consume_chunk;
+
+ /* Called when a blob has been fully read. A successful call to
+ * @begin_blob will always be matched by a call to @end_blob. */
+ read_blob_list_end_blob_t end_blob;
+
+ /* Parameter passed to @begin_blob. */
+ void *begin_blob_ctx;
+
+ /* Parameter passed to @consume_chunk. */
+ void *consume_chunk_ctx;
+
+ /* Parameter passed to @end_blob. */
+ void *end_blob_ctx;
+};
+
+/* Flags for read_blob_list() */
+#define VERIFY_BLOB_HASHES 0x1
+#define COMPUTE_MISSING_BLOB_HASHES 0x2
+#define BLOB_LIST_ALREADY_SORTED 0x4