set_compress_slow(void)
{
int ret;
- static const struct wimlib_lzx_params slow_params = {
- .size_of_this = sizeof(struct wimlib_lzx_params),
+ static const struct wimlib_lzx_compressor_params slow_params = {
+ .hdr = {
+ .size = sizeof(struct wimlib_lzx_compressor_params),
+ },
.algorithm = WIMLIB_LZX_ALGORITHM_SLOW,
.alg_params = {
.slow = {
},
},
};
- ret = wimlib_lzx_set_default_params(&slow_params);
+ ret = wimlib_set_default_compressor_params(WIMLIB_COMPRESSION_TYPE_LZX,
+ &slow_params.hdr);
if (ret)
imagex_error(T("Couldn't set slow compression parameters.!"));
return ret;
/* Set default compression type. */
if (compression_type == WIMLIB_COMPRESSION_TYPE_INVALID) {
- struct wimlib_lzx_params params;
+ struct wimlib_lzx_compressor_params params;
memset(¶ms, 0, sizeof(params));
- params.size_of_this = sizeof(params);
+ params.hdr.size = sizeof(params);
params.algorithm = WIMLIB_LZX_ALGORITHM_FAST;
params.use_defaults = 1;
- wimlib_lzx_set_default_params(¶ms);
+ wimlib_set_default_compressor_params(WIMLIB_COMPRESSION_TYPE_LZX,
+ ¶ms.hdr);
compression_type = WIMLIB_COMPRESSION_TYPE_LZX;
}