]> wimlib.net Git - wimlib/commitdiff
wimlib-imagex: Allow specifying LZMS compression
authorEric Biggers <ebiggers3@gmail.com>
Tue, 24 Dec 2013 01:30:56 +0000 (19:30 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 24 Dec 2013 01:30:56 +0000 (19:30 -0600)
programs/imagex.c
src/compress_chunk.c
src/extract.c
src/write.c

index b0f6283442ae710c36013a7e1a0c60b524608df6..b9fd2d79cea518e883c4b42b4a731abe14e6f773 100644 (file)
@@ -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 {
index 0f8b6c454c89445e1a9980a00d58a0322d0aaf57..bd92cd6aacdb12a8fb89ced8a9b97001c4802a4d 100644 (file)
@@ -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:
index 1c7c2b07f9a73edd6a006801e9cc1eb1fd802348..9feb7a0e6a718d563a2fc3ca6c9d045ed170d849 100644 (file)
@@ -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
index 7e2ac220ef82a923f4d1b436186a6c836df99aa7..98ee80d8fef81df7d3d629b2b02f14ee41278633 100644 (file)
@@ -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,