]> wimlib.net Git - wimlib/commitdiff
Swap XPRESS and LZX constants
authorEric Biggers <ebiggers3@gmail.com>
Thu, 24 Apr 2014 19:08:46 +0000 (14:08 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 24 Apr 2014 19:08:46 +0000 (14:08 -0500)
NEWS
include/wimlib.h
src/lookup_table.c
src/write.c

diff --git a/NEWS b/NEWS
index 82fd8adc1cdd2598ee4407e78223323bb191faf3..2eef07bdd324950dfae2115d9e9855bdd226ab3b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,11 @@ Version 1.6.3-BETA:
        wimcapture and wimapply, respectively, for more information.
 
        The shared library version has been bumped up; however, there are only
-       small incompatibilities:
+       a few incompatibilities:
+
+               - WIMLIB_COMPRESSION_TYPE_XPRESS is now 1 and
+                 WIMLIB_COMPRESSION_TYPE_LZX is now 2 (so it's the same as
+                 WIMGAPI).
 
                - 'struct' wimlib_capture_config has been removed.  The library
                  now takes the path to the configuration file directly.  This
index b47251f8647dc70e67603eedb05461fb6eaee3a6..77fe0ff9157aa8273c0fb0236b7f39d35477ad8c 100644 (file)
@@ -410,11 +410,11 @@ enum wimlib_compression_type {
        /** The WIM does not include any compressed resources. */
        WIMLIB_COMPRESSION_TYPE_NONE = 0,
 
-       /** Compressed resources in the WIM use LZX compression. */
-       WIMLIB_COMPRESSION_TYPE_LZX = 1,
-
        /** Compressed resources in the WIM use XPRESS compression. */
-       WIMLIB_COMPRESSION_TYPE_XPRESS = 2,
+       WIMLIB_COMPRESSION_TYPE_XPRESS = 1,
+
+       /** Compressed resources in the WIM use LZX compression. */
+       WIMLIB_COMPRESSION_TYPE_LZX = 2,
 
        /** Compressed resources in the WIM use LZMS compression.  Note: LZMS
         * compression is only compatible with wimlib v1.6.0 and later and with
index 098a8aaf194b2dce63a15b97b7127d48e6814c72..2cca979c6996c3983ffe12f47f2532c77dfb64a1 100644 (file)
@@ -774,8 +774,8 @@ read_wim_lookup_table(WIMStruct *wim)
                        /* Compression format numbers must be the same as in
                         * WIMGAPI to be compatible here.  */
                        BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_NONE != 0);
-                       BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_LZX != 1);
-                       BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_XPRESS != 2);
+                       BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_XPRESS != 1);
+                       BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_LZX != 2);
                        BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_LZMS != 3);
                        cur_rspec->compression_type = le32_to_cpu(hdr.compression_format);
 
index 07b557500b894ae70c770705b10d12500cdae5c2..bfa5d2edecba9f3e3c676aa156eaa5540b4c5bc7 100644 (file)
@@ -569,8 +569,8 @@ end_chunk_table(struct write_streams_ctx *ctx, u64 res_actual_size,
                        hdr.chunk_size = cpu_to_le32(ctx->out_chunk_size);
                        hdr.compression_format = cpu_to_le32(ctx->out_ctype);
 
-                       BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_LZX != 1);
-                       BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_XPRESS != 2);
+                       BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_XPRESS != 1);
+                       BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_LZX != 2);
                        BUILD_BUG_ON(WIMLIB_COMPRESSION_TYPE_LZMS != 3);
 
                        ret = full_pwrite(ctx->out_fd, &hdr, sizeof(hdr),