# include <sys/file.h>
#endif
-#include "wimlib/compress_chunks.h"
+#include "wimlib/chunk_compressor.h"
#include "wimlib/endianness.h"
#include "wimlib/error.h"
#include "wimlib/file_io.h"
* no streams are hard-filtered or no streams are unhashed, this parameter
* can be NULL.
*
- * @comp_ctx
- * A location in which to allocate the pointer to the default LZX
- * compression context. This will only be used if @out_ctype is
- * WIMLIB_COMPRESSION_TYPE_LZX.
- *
* @progress_func
* If non-NULL, a progress function that will be called periodically with
* WIMLIB_PROGRESS_MSG_WRITE_STREAMS messages. Note that on-the-fly
unsigned num_threads,
struct wim_lookup_table *lookup_table,
struct filter_context *filter_ctx,
- struct wimlib_lzx_context **comp_ctx,
wimlib_progress_func_t progress_func)
{
int ret;
}
if (ctx.compressor == NULL) {
- if (out_ctype == WIMLIB_COMPRESSION_TYPE_LZX) {
- ret = wimlib_lzx_alloc_context(out_chunk_size,
- NULL,
- comp_ctx);
- if (ret)
- goto out_destroy_context;
- }
ret = new_serial_chunk_compressor(out_ctype, out_chunk_size,
- *comp_ctx, &ctx.compressor);
+ &ctx.compressor);
if (ret)
goto out_destroy_context;
}
struct filedes *out_fd,
int out_ctype,
u32 out_chunk_size,
- int write_resource_flags,
- struct wimlib_lzx_context **comp_ctx)
+ int write_resource_flags)
{
LIST_HEAD(stream_list);
list_add(<e->write_streams_list, &stream_list);
1,
NULL,
NULL,
- comp_ctx,
NULL);
}
u32 out_chunk_size,
struct wim_reshdr *out_reshdr,
u8 *hash,
- int write_resource_flags,
- struct wimlib_lzx_context **comp_ctx)
+ int write_resource_flags)
{
int ret;
struct wim_lookup_table_entry *lte;
}
ret = write_wim_resource(lte, out_fd, out_ctype, out_chunk_size,
- write_resource_flags, comp_ctx);
+ write_resource_flags);
if (ret)
goto out_free_lte;
num_threads,
wim->lookup_table,
filter_ctx,
- &wim->lzx_context,
progress_func);
}
&wim->out_fd,
wim->out_compression_type,
wim->out_chunk_size,
- write_resource_flags,
- &wim->lzx_context);
+ write_resource_flags);
}
if (ret)
return ret;
&wim->out_fd,
wim->hdr.part_number,
out_reshdr,
- write_flags_to_resource_flags(write_flags),
- &wim->lzx_context);
+ write_flags_to_resource_flags(write_flags));
}
/*
num_threads,
wim->lookup_table,
&filter_ctx,
- &wim->lzx_context,
progress_func);
if (ret)
goto out_truncate;