]> wimlib.net Git - wimlib/commitdiff
Allow up to 1 GiB LZMS dictionary
authorEric Biggers <ebiggers3@gmail.com>
Mon, 27 Jan 2014 06:36:27 +0000 (00:36 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 28 Jan 2014 03:29:29 +0000 (21:29 -0600)
Seemingly not compatible with WIMGAPI, but it works with the format.

doc/imagex-capture.1.in
src/wim.c

index eecfb987c8d077fd9813fba22981f0bae31b7bfe..d1b7f95de105f66869f1b013e426a17618ed5b6e 100644 (file)
@@ -225,7 +225,7 @@ decide to use this option regardless, you may choose a chunk size that is a
 power of 2 greater than or equal to 2^15 (32768) up to a maximum determined by
 the compression format.  For LZX ("maximum") compression, the maximum allowed
 chunk size is 2^21 (2097152), and for XPRESS ("fast") and LZMS ("recovery")
 power of 2 greater than or equal to 2^15 (32768) up to a maximum determined by
 the compression format.  For LZX ("maximum") compression, the maximum allowed
 chunk size is 2^21 (2097152), and for XPRESS ("fast") and LZMS ("recovery")
-compression, the maximum allowed chunk size is 2^26 (67108864).
+compression, the maximum allowed chunk size is 2^30 (1073741824).
 .IP ""
 For XPRESS and LZX compression, Microsoft's implementation (as of Windows 8)
 does not appear to support alternate chunk sizes; although it will still open
 .IP ""
 For XPRESS and LZX compression, Microsoft's implementation (as of Windows 8)
 does not appear to support alternate chunk sizes; although it will still open
@@ -254,12 +254,12 @@ option to change the compression type used in packed resources; however, the
 \fB--pack-chunk-size\fR=\fISIZE\fR, \fB--solid-chunk-size\fR=\fISIZE\fR
 Like \fB--chunk-size\fR, but set the chunk size used in packed resources.  The
 compression format is LZMS, so the chunk size can be any power of 2 between 2^15
 \fB--pack-chunk-size\fR=\fISIZE\fR, \fB--solid-chunk-size\fR=\fISIZE\fR
 Like \fB--chunk-size\fR, but set the chunk size used in packed resources.  The
 compression format is LZMS, so the chunk size can be any power of 2 between 2^15
-and 2^26, inclusively.  WIMGAPI (Windows 8) appears to be compatible with all
-these sizes, despite not being compatible with sizes greater than 2^20 in
-non-packed resources.  The default is currently 2^25 (33554432).  Note:
-currently, the LZMS compression algorithm uses about 15 times the chunk size in
-memory per thread, which is about 500 MB per thread for the default pack chunk
-size of 2^25 or 1 GB per thread if you change it to 2^26 (67108864).
+and 2^30, inclusively.  WIMGAPI (Windows 8) appears to be compatible with these
+sizes up to 2^26 inclusively, despite not being compatible with sizes greater
+than 2^20 in non-packed resources.  The default is currently 2^25 (33554432).
+Note: currently, the LZMS compression algorithm uses about 15 times the chunk
+size in memory per thread, which is about 500 MB per thread for the default pack
+chunk size of 2^25 or 1 GB per thread if you change it to 2^26 (67108864).
 .TP
 \fB--threads\fR=\fINUM_THREADS\fR
 Number of threads to use for compressing data.  Default: autodetect (number of
 .TP
 \fB--threads\fR=\fINUM_THREADS\fR
 Number of threads to use for compressing data.  Default: autodetect (number of
index fc1cfef702816e0a0a71122a5cfbd724747c3e96..9daa8e3bc60c8765ac1022a89002da1d32f19bea 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -130,8 +130,9 @@ wim_chunk_size_valid(u32 chunk_size, int ctype)
                return order >= 15 && order <= 21;
 
        case WIMLIB_COMPRESSION_TYPE_XPRESS:
                return order >= 15 && order <= 21;
 
        case WIMLIB_COMPRESSION_TYPE_XPRESS:
-       case WIMLIB_COMPRESSION_TYPE_LZMS:
                return order >= 15 && order <= 26;
                return order >= 15 && order <= 26;
+       case WIMLIB_COMPRESSION_TYPE_LZMS:
+               return order >= 15 && order <= 30;
        }
        return false;
 }
        }
        return false;
 }