From: Eric Biggers Date: Tue, 24 Dec 2013 01:30:56 +0000 (-0600) Subject: wimlib-imagex: Allow specifying LZMS compression X-Git-Tag: v1.6.0~122 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=a6e50e8eb32035d44c94fd63bfae6c3de7481055 wimlib-imagex: Allow specifying LZMS compression --- diff --git a/programs/imagex.c b/programs/imagex.c index b0f62834..b9fd2d79 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -418,6 +418,8 @@ get_compression_type(const tchar *optarg) return WIMLIB_COMPRESSION_TYPE_LZX; else if (!tstrcasecmp(optarg, T("fast")) || !tstrcasecmp(optarg, T("xpress"))) return WIMLIB_COMPRESSION_TYPE_XPRESS; + else if (!tstrcasecmp(optarg, T("recovery")) || !tstrcasecmp(optarg, T("lzms"))) + return WIMLIB_COMPRESSION_TYPE_LZMS; else if (!tstrcasecmp(optarg, T("none"))) return WIMLIB_COMPRESSION_TYPE_NONE; else { diff --git a/src/compress_chunk.c b/src/compress_chunk.c index 0f8b6c45..bd92cd6a 100644 --- a/src/compress_chunk.c +++ b/src/compress_chunk.c @@ -25,7 +25,6 @@ compress_chunk(const void * uncompressed_data, compressed_data, comp_ctx); case WIMLIB_COMPRESSION_TYPE_LZMS: - WARNING("LZMS compression not implemented! Writing uncompressed data."); return 0; default: diff --git a/src/extract.c b/src/extract.c index 1c7c2b07..9feb7a0e 100644 --- a/src/extract.c +++ b/src/extract.c @@ -534,10 +534,10 @@ error: * This function operates slightly differently depending on whether @lte_spec is * NULL or not. When @lte_spec is NULL, the behavior is to extract the default * file contents (unnamed stream), and, if named data streams are supported in - * the extract mode and volume, any named data streams. When @lte_spec is NULL, - * the behavior is to extract only all copies of the stream @lte_spec, and in - * addition use @lte_spec to set the reparse data or create the symbolic link if - * appropriate. + * the extract mode and volume, any named data streams. When @lte_spec is not + * NULL, the behavior is to extract only all copies of the stream @lte_spec, and + * in addition use @lte_spec to set the reparse data or create the symbolic link + * if appropriate. * * @path * Path to file to extract (as can be passed to apply_operations diff --git a/src/write.c b/src/write.c index 7e2ac220..98ee80d8 100644 --- a/src/write.c +++ b/src/write.c @@ -1213,6 +1213,12 @@ write_stream_list(struct list_head *stream_list, * bytes needing to be compressed is less 2000000 (heuristic value). */ if (out_ctype != WIMLIB_COMPRESSION_TYPE_NONE) { + if (out_ctype == WIMLIB_COMPRESSION_TYPE_LZMS && + ctx.lookup_table != NULL) { + WARNING("LZMS compression not implemented; data will " + "actually be written uncompressed."); + } + if (ctx.num_bytes_to_compress >= 2000000) { ret = new_parallel_chunk_compressor(out_ctype, out_chunk_size,