# include "config.h"
#endif
+#include <limits.h>
+#include <pthread.h>
+#include <string.h>
+
#include "wimlib/compress_common.h"
#include "wimlib/compressor_ops.h"
#include "wimlib/endianness.h"
#include "wimlib/unaligned.h"
#include "wimlib/util.h"
-#include <string.h>
-#include <limits.h>
-#include <pthread.h>
-
/* Stucture used for writing raw bits as a series of 16-bit little endian coding
* units. This starts at the *end* of the compressed data buffer and proceeds
* backwards. */
memset(mf_params, 0, sizeof(*mf_params));
/* Choose an appropriate match-finding algorithm. */
- if (max_window_size <= 2097152)
- mf_params->algorithm = LZ_MF_BINARY_TREES;
- else if (max_window_size <= 33554432)
+ if (max_window_size <= 33554432)
mf_params->algorithm = LZ_MF_LCP_INTERVAL_TREE;
else
mf_params->algorithm = LZ_MF_LINKED_SUFFIX_ARRAY;
struct lz_mf_params mf_params;
u64 size = 0;
- if (max_block_size >= INT32_MAX)
+ if (max_block_size > LZMS_MAX_BUFFER_SIZE)
return 0;
lzms_build_params(compression_level, ¶ms);
struct lzms_compressor_params params;
struct lz_mf_params mf_params;
- if (max_block_size >= INT32_MAX)
+ if (max_block_size > LZMS_MAX_BUFFER_SIZE)
return WIMLIB_ERR_INVALID_PARAM;
lzms_build_params(compression_level, ¶ms);