-/* wimlib internal flags used when reading or writing resources. */
-#define WIMLIB_WRITE_RESOURCE_FLAG_RECOMPRESS 0x00000001
-#define WIMLIB_WRITE_RESOURCE_FLAG_PIPABLE 0x00000002
-#define WIMLIB_WRITE_RESOURCE_MASK 0x0000ffff
-
-#define WIMLIB_READ_RESOURCE_FLAG_RAW_FULL 0x80000000
-#define WIMLIB_READ_RESOURCE_FLAG_RAW_CHUNKS 0x40000000
-#define WIMLIB_READ_RESOURCE_FLAG_RAW (WIMLIB_READ_RESOURCE_FLAG_RAW_FULL | \
- WIMLIB_READ_RESOURCE_FLAG_RAW_CHUNKS)
-#define WIMLIB_READ_RESOURCE_MASK 0xffff0000
+/* Alternate chunk table format for resources with
+ * WIM_RESHDR_FLAG_PACKED_STREAMS set. */
+struct alt_chunk_table_header_disk {
+ /* Uncompressed size of the resource in bytes. */
+ le64 res_usize;
+
+ /* Number of bytes each compressed chunk decompresses into, except
+ * possibly the last which decompresses into the remainder. This
+ * overrides the chunk size specified by the WIM header. */
+ le32 chunk_size;
+
+ /* Compression format used for compressed chunks:
+ * 0 = None
+ * 1 = XPRESS
+ * 2 = LZX
+ * 3 = LZMS
+ *
+ * This overrides the compression type specified by the WIM header. */
+ le32 compression_format;
+
+ /* This header is directly followed by a table of compressed sizes of
+ * the chunks (4 bytes per entry). */
+} _packed_attribute;