-/* Description of the location, size, and compression status of a WIM resource
- * (stream). This is the in-memory version of `struct resource_entry_disk'. */
-struct resource_entry {
- /* Size, in bytes, of the resource as it appears in the WIM file. If
- * the resource is uncompressed, this will be the same as
- * @original_size. If the resource is compressed, this will be the
- * compressed size of the resource, including all compressed chunks as
- * well as the chunk table.
- *
- * Note: if the WIM is "pipable", this value does not include the stream
- * header. */
- u64 size : 56;
-
- /* Bitwise OR of one or more of the WIM_RESHDR_FLAG_* flags. */
- u64 flags : 8;
+/* Specification of a resource in a WIM file.
+ *
+ * If a `struct wim_lookup_table_entry' lte has
+ * (lte->resource_location == RESOURCE_IN_WIM), then lte->wim_res_spec points to
+ * an instance of this structure.
+ *
+ * Normally, there is a one-to-one correspondence between WIM lookup table
+ * entries ("streams") and WIM resources. However, the flag
+ * WIM_RESHDR_FLAG_CONCAT can be used to specify that two streams be combined
+ * into the same resource and compressed together. Caveats about this flag are
+ * noted in the comment above the definition of WIM_VERSION_STREAM_CONCAT. */
+struct wim_resource_spec {
+ /* The WIM file containing this resource. */
+ WIMStruct *wim;
+
+ /* Offset, in bytes, from the start of WIM file at which this resource
+ * starts. */
+ u64 offset_in_wim;
+
+ /* The size of this resource in the WIM file. For compressed resources
+ * this is the compressed size. */
+ u64 size_in_wim;
+
+ /* Number of bytes of uncompressed data this resource uncompresses to.
+ */
+ u64 uncompressed_size;
+
+ /* List of streams this resource contains. */
+ struct list_head lte_list;
+
+ /* Resource flags. */
+ u32 flags : 8;
+
+ /* This flag will be set if the WIM is pipable and therefore the
+ * resource will be in a slightly different format if it is compressed
+ * (wimlib extension). */
+ u32 is_pipable : 1;
+
+ /* Compression type of this resource as one of WIMLIB_COMPRESSION_TYPE_*
+ * constants. */
+ u32 ctype : 3;
+
+ /* Compression chunk size. */
+ u32 cchunk_size;
+};