+/* The resource is packed in a special format that may contain multiple
+ * underlying streams, or this resource entry represents a stream packed into
+ * one such resource. When resources have this flag set, the WIM version number
+ * should be WIM_VERSION_PACKED_STREAMS. */
+#define WIM_RESHDR_FLAG_PACKED_STREAMS 0x10
+
+/* Returns true if the specified WIM resource is compressed, using either the
+ * original chunk table layout or the alternate layout for resources that may
+ * contain multiple packed streams. */
+static inline bool
+resource_is_compressed(const struct wim_resource_spec *rspec)
+{
+ return (rspec->flags & (WIM_RESHDR_FLAG_COMPRESSED |
+ WIM_RESHDR_FLAG_PACKED_STREAMS));
+}