-skip_wim_stream(struct wim_lookup_table_entry *lte);
-
-/*
- * Type of callback function for beginning to read a stream.
- *
- * @lte:
- * Stream that is about to be read.
- *
- * @flags:
- * Bitwise OR of BEGIN_STREAM_FLAG_PARTIAL_RESOURCE and/or
- * BEGIN_STREAM_FLAG_WHOLE_STREAM.
- *
- * @ctx:
- * User-provided context.
- *
- * Must return 0 on success, a positive error code on failure, or the special
- * value BEGIN_STREAM_STATUS_SKIP_STREAM to indicate that the stream should not
- * be read, and read_stream_list() should continue on to the next stream
- * (without calling @consume_chunk or @end_stream).
- */
-typedef int (*read_stream_list_begin_stream_t)(struct wim_lookup_table_entry *lte,
- u32 flags,
- void *ctx);
-
-/* Set to true if the stream is just one of several being read from a single
- * pack and therefore would be extra expensive to read independently. */
-#define BEGIN_STREAM_FLAG_PARTIAL_RESOURCE 0x00000001
-
-/* This is purely advisory and indicates that the entire stream data will be
- * provided in one call to consume_chunk(). */
-#define BEGIN_STREAM_FLAG_WHOLE_STREAM 0x00000002
-
-#define BEGIN_STREAM_STATUS_SKIP_STREAM -1
-
-/*
- * Type of callback function for finishing reading a stream.
- *
- * @lte:
- * Stream that has been fully read, or stream that started being read but
- * could not be fully read due to a read error.
- *
- * @status:
- * 0 if reading the stream was successful; otherwise a nonzero error code
- * that specifies the return status.
- *
- * @ctx:
- * User-provided context.
- */
-typedef int (*read_stream_list_end_stream_t)(struct wim_lookup_table_entry *lte,
- int status,
- void *ctx);
-
-
-/* Callback functions and contexts for read_stream_list(). */
-struct read_stream_list_callbacks {
-
- /* Called when a stream is about to be read. */
- read_stream_list_begin_stream_t begin_stream;
-
- /* Called when a chunk of data has been read. */
- consume_data_callback_t consume_chunk;
-
- /* Called when a stream has been fully read. A successful call to
- * @begin_stream will always be matched by a call to @end_stream. */
- read_stream_list_end_stream_t end_stream;
-
- /* Parameter passed to @begin_stream. */
- void *begin_stream_ctx;
+skip_wim_resource(const struct wim_resource_descriptor *rdesc);
+
+/* Callback functions for reading blobs */
+struct read_blob_callbacks {
+
+ /* Called when starting to read a blob. Must return 0 on success, or a
+ * positive wimlib error code on failure, or in the case of
+ * read_blob_list(), the special value BEGIN_BLOB_STATUS_SKIP_BLOB which
+ * indicates that the data for this blob should not be read. */
+ int (*begin_blob)(struct blob_descriptor *blob, void *ctx);
+#define BEGIN_BLOB_STATUS_SKIP_BLOB (-1)
+
+ /* Called when the next chunk of uncompressed data is available. 'size'
+ * is guaranteed to be nonzero. Must return 0 on success, or a positive
+ * wimlib error code on failure. */
+ int (*consume_chunk)(const void *chunk, size_t size, void *ctx);
+
+ /* Called when a blob has been successfully read (status=0), or when
+ * begin_blob() was successfully called but an error occurred before the
+ * blob was fully read (status != 0; in this case the implementation
+ * should do cleanup and then pass on the status). Must return 0 on
+ * success, or a positive wimlib error code on failure. */
+ int (*end_blob)(struct blob_descriptor *blob, int status, void *ctx);
+
+ /* Parameter passed to each of the callback functions. */
+ void *ctx;
+};