X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fheader.c;h=f52c72b7562a852e36b09e9a350dcd00316558e2;hb=882dc6e5dece7f521b9de6c4337aad0411ed00da;hp=90d40ded2b17f8284ec0d0ca638f42ab2231393c;hpb=e176e9731e696562bab8de7b9bd34c019deef3e8;p=wimlib diff --git a/src/header.c b/src/header.c index 90d40ded..f52c72b7 100644 --- a/src/header.c +++ b/src/header.c @@ -226,7 +226,8 @@ set_wim_hdr_cflags(int ctype, struct wim_header *hdr) WIM_HDR_FLAG_COMPRESS_LZX | WIM_HDR_FLAG_COMPRESS_RESERVED | WIM_HDR_FLAG_COMPRESS_XPRESS | - WIM_HDR_FLAG_COMPRESS_LZMS); + WIM_HDR_FLAG_COMPRESS_LZMS | + WIM_HDR_FLAG_COMPRESS_XPRESS_2); switch (ctype) { case WIMLIB_COMPRESSION_TYPE_NONE: @@ -257,7 +258,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; @@ -285,6 +290,8 @@ struct hdr_flag hdr_flags[] = { {WIM_HDR_FLAG_COMPRESS_RESERVED,"COMPRESS_RESERVED"}, {WIM_HDR_FLAG_COMPRESS_LZX, "COMPRESS_LZX"}, {WIM_HDR_FLAG_COMPRESS_XPRESS, "COMPRESS_XPRESS"}, + {WIM_HDR_FLAG_COMPRESS_LZMS, "COMPRESS_LZMS"}, + {WIM_HDR_FLAG_COMPRESS_XPRESS_2,"COMPRESS_XPRESS_2"}, }; /* API function documented in wimlib.h */