+ /* Information from the header of the WIM file.
+ *
+ * This is also maintained for a WIMStruct not backed by a file, but in
+ * that case the 'reshdr' fields are left zeroed. */
+ struct wim_header hdr;
+
+ /* If the library is currently writing this WIMStruct out to a file,
+ * then this is the header being created for that file. */
+ struct wim_header out_hdr;
+
+ /* Array of image metadata, one for each image in the WIM (array length
+ * hdr.image_count). Or, this will be NULL if this WIM does not contain
+ * metadata, which implies that this WIMStruct either represents part of
+ * a non-standalone WIM, or represents a standalone WIM that, oddly
+ * enough, actually contains 0 images. */
+ struct wim_image_metadata **image_metadata;
+
+ /* Information from the XML data of the WIM file. This information is
+ * also maintained for a WIMStruct not backed by a file. */
+ struct wim_xml_info *xml_info;
+
+ /* The blob table for this WIMStruct. If this WIMStruct has a backing
+ * file, then this table will index the blobs contained in that file.
+ * In addition, this table may index blobs that were added by updates or
+ * referenced from other WIMStructs. */
+ struct blob_table *blob_table;
+
+ /* The number of references to this WIMStruct. This is equal to the
+ * number of resource descriptors that reference this WIMStruct, plus 1
+ * if wimlib_free() still needs to be called. */
+ ssize_t refcnt;
+
+ /*
+ * The 1-based index of the currently selected image in this WIMStruct,
+ * or WIMLIB_NO_IMAGE if no image is currently selected.
+ *
+ * The metadata for the current image is image_metadata[current_image -
+ * 1]. Since we load image metadata lazily, only the metadata for the
+ * current image is guaranteed to actually be present in memory.
+ */
+ int current_image;
+
+ /* The absolute path to the on-disk file backing this WIMStruct, or NULL
+ * if this WIMStruct is not backed by an on-disk file. */
+ tchar *filename;
+
+ /* If this WIMStruct has a backing file, then this is a file descriptor
+ * open to that file with read access. Otherwise, this field is invalid
+ * (!filedes_valid(&in_fd)). */