*/
if (lte->is_pipable == !!(resource_flags &
WIMLIB_WRITE_RESOURCE_FLAG_PIPABLE))
+ {
resource_flags |= WIMLIB_READ_RESOURCE_FLAG_RAW_FULL;
- else
+ read_size = lte->resource_entry.size;
+ } else {
resource_flags |= WIMLIB_READ_RESOURCE_FLAG_RAW_CHUNKS;
- read_size = lte->resource_entry.size;
+ read_size = lte->resource_entry.original_size;
+ }
write_ctx.doing_sha = false;
} else {
write_ctx.doing_sha = true;
if (!(resource_flags & WIMLIB_READ_RESOURCE_FLAG_RAW)) {
write_ctx.out_ctype = out_ctype;
if (out_ctype == WIMLIB_COMPRESSION_TYPE_LZX) {
- ret = wimlib_lzx_alloc_context(NULL, comp_ctx);
+ ret = wimlib_lzx_alloc_context(out_chunk_size,
+ NULL, comp_ctx);
if (ret)
goto out;
}
params[i].compressed_res_queue = &compressed_res_queue;
params[i].out_ctype = out_ctype;
if (out_ctype == WIMLIB_COMPRESSION_TYPE_LZX) {
- ret = wimlib_lzx_alloc_context(NULL, ¶ms[i].comp_ctx);
+ ret = wimlib_lzx_alloc_context(out_chunk_size,
+ NULL, ¶ms[i].comp_ctx);
if (ret)
goto out_free_params;
}