]> wimlib.net Git - wimlib/blobdiff - src/lz_repsearch.c
Factor out lz_repsearch() and also use for LZMS
[wimlib] / src / lz_repsearch.c
diff --git a/src/lz_repsearch.c b/src/lz_repsearch.c
new file mode 100644 (file)
index 0000000..2f78a61
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * lz_repsearch.c
+ *
+ * Fast searching for repeat offset matches.
+ *
+ * The author dedicates this file to the public domain.
+ * You can do whatever you want with this file.
+ *
+ */
+
+#include "wimlib/lz_repsearch.h"
+#include "wimlib/lz_extend.h"
+
+u32
+lz_extend_repmatch(const u8 *strptr, const u8 *matchptr, u32 max_len)
+{
+       return lz_extend(strptr, matchptr, 2, max_len);
+}