+/*
+ * Reads the header from a WIM file.
+ *
+ * @filename
+ * Name of the WIM file (for error/debug messages only), or NULL if reading
+ * directly from file descriptor.
+ * @in_fd
+ * File descriptor, positioned at offset 0, to read the header from.
+ * @hdr
+ * Structure to read the header into.
+ *
+ * Return values:
+ * WIMLIB_ERR_SUCCESS (0)
+ * WIMLIB_ERR_IMAGE_COUNT
+ * WIMLIB_ERR_INVALID_CHUNK_SIZE
+ * WIMLIB_ERR_INVALID_PART_NUMBER
+ * WIMLIB_ERR_NOT_A_WIM_FILE
+ * WIMLIB_ERR_READ
+ * WIMLIB_ERR_UNEXPECTED_END_OF_FILE
+ * WIMLIB_ERR_UNKNOWN_VERSION
+ */