From d54bde2b67e0e7013b984aae017a0a011948e75b Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 15 Feb 2015 19:04:29 -0600 Subject: [PATCH] Use 64MiB chunks by default for solid LZMS --- doc/man1/wimlib-imagex-capture.1 | 2 +- include/wimlib.h | 4 ++-- src/wim.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/man1/wimlib-imagex-capture.1 b/doc/man1/wimlib-imagex-capture.1 index 5f540473..8c18a277 100644 --- a/doc/man1/wimlib-imagex-capture.1 +++ b/doc/man1/wimlib-imagex-capture.1 @@ -256,7 +256,7 @@ compression, as these are two different things. .TP \fB--solid-chunk-size\fR=\fISIZE\fR Like \fB--chunk-size\fR, but set the chunk size used in solid resources. The -default, assuming LZMS compression, is 32MiB (33554432). This option only has +default, assuming LZMS compression, is 64MiB (67108864). This option only has an effect when \fB--solid\fR is also specified. For maximum compatibility with the Microsoft implementation, do not use this option. .TP diff --git a/include/wimlib.h b/include/wimlib.h index c2ecb48d..47630bcf 100644 --- a/include/wimlib.h +++ b/include/wimlib.h @@ -517,7 +517,7 @@ enum wimlib_compression_type { * * If using wimlib_create_compressor() to create an LZMS compressor * directly, the @p max_block_size parameter may be any positive value - * up to and including 1180427429. + * up to and including 2^30. */ WIMLIB_COMPRESSION_TYPE_LZMS = 3, }; @@ -2232,7 +2232,7 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour * all streams recompressed in solid mode. * * Currently, new solid resources will, by default, be written using LZMS - * compression with 32 MiB (33554432 byte) chunks. Use + * compression with 64 MiB (67108864 byte) chunks. Use * wimlib_set_output_pack_compression_type() and/or * wimlib_set_output_pack_chunk_size() to change this. This is independent of * the WIM's main compression type and chunk size; you can have a WIM that diff --git a/src/wim.c b/src/wim.c index 27708e23..4fc02efb 100644 --- a/src/wim.c +++ b/src/wim.c @@ -60,9 +60,9 @@ static u32 wim_default_solid_chunk_size(int ctype) { switch (ctype) { case WIMLIB_COMPRESSION_TYPE_LZMS: - return 1U << 25; /* 33554432 */ + return (u32)1 << 26; /* 67108864 */ default: - return 1U << 15; /* 32768 */ + return (u32)1 << 15; /* 32768 */ } } -- 2.43.0