]> wimlib.net Git - wimlib/blobdiff - src/header.c
Add wimlib_set_output_{pack_chunk_size,compression_type}()
[wimlib] / src / header.c
index 90d40ded2b17f8284ec0d0ca638f42ab2231393c..0f9555195238e170aee895c640f96f9292b4cb80 100644 (file)
@@ -257,7 +257,11 @@ init_wim_header(struct wim_header *hdr, int ctype, u32 chunk_size)
 {
        memset(hdr, 0, sizeof(struct wim_header));
        hdr->magic = WIM_MAGIC;
-       hdr->wim_version = WIM_VERSION_DEFAULT;
+
+       if (ctype == WIMLIB_COMPRESSION_TYPE_LZMS)
+               hdr->wim_version = WIM_VERSION_PACKED_STREAMS;
+       else
+               hdr->wim_version = WIM_VERSION_DEFAULT;
        if (set_wim_hdr_cflags(ctype, hdr)) {
                ERROR("Invalid compression type specified (%d)", ctype);
                return WIMLIB_ERR_INVALID_COMPRESSION_TYPE;