]> wimlib.net Git - wimlib/blobdiff - src/write.c
Adjust documentation for alternate chunk sizes
[wimlib] / src / write.c
index b8d86e85fc7bf6540630ac8f0f1d950b64c226c9..63350bfc83bcaa8c61ca29a4bb6b688180c87f70 100644 (file)
@@ -39,6 +39,7 @@
 #include "wimlib/error.h"
 #include "wimlib/file_io.h"
 #include "wimlib/header.h"
+#include "wimlib/inode.h"
 #include "wimlib/integrity.h"
 #include "wimlib/lookup_table.h"
 #include "wimlib/metadata.h"
@@ -1429,11 +1430,11 @@ write_stream_list(struct list_head *stream_list,
         * to do compression.  There are serial and parallel implementations of
         * the chunk_compressor interface.  We default to parallel using the
         * specified number of threads, unless the upper bound on the number
-        * bytes needing to be compressed is less 2000000 (heuristic value).  */
+        * bytes needing to be compressed is less than a heuristic value.  */
        if (out_ctype != WIMLIB_COMPRESSION_TYPE_NONE) {
 
        #ifdef ENABLE_MULTITHREADED_COMPRESSION
-               if (ctx.num_bytes_to_compress >= 2000000) {
+               if (ctx.num_bytes_to_compress > max(2000000, out_chunk_size)) {
                        ret = new_parallel_chunk_compressor(out_ctype,
                                                            out_chunk_size,
                                                            num_threads, 0,
@@ -1842,7 +1843,7 @@ determine_stream_size_uniquity(struct list_head *stream_list,
        struct stream_size_table tab;
        struct wim_lookup_table_entry *lte;
 
-       ret = init_stream_size_table(&tab, lt->capacity);
+       ret = init_stream_size_table(&tab, 9001);
        if (ret)
                return ret;