4 * A match-finder for Lempel-Ziv compression based on bottom-up construction and
5 * traversal of the Longest Common Prefix (LCP) interval tree.
7 * The following copying information applies to this specific source code file:
9 * Written in 2014-2015 by Eric Biggers <ebiggers3@gmail.com>
11 * To the extent possible under law, the author(s) have dedicated all copyright
12 * and related and neighboring rights to this software to the public domain
13 * worldwide via the Creative Commons Zero 1.0 Universal Public Domain
14 * Dedication (the "CC0").
16 * This software is distributed in the hope that it will be useful, but WITHOUT
17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 * FOR A PARTICULAR PURPOSE. See the CC0 for more details.
20 * You should have received a copy of the CC0 along with this software; if not
21 * see <http://creativecommons.org/publicdomain/zero/1.0/>.
24 #ifndef _LCPIT_MATCHFINDER_H
25 #define _LCPIT_MATCHFINDER_H
27 #include "wimlib/types.h"
29 struct lcpit_matchfinder {
48 lcpit_matchfinder_get_needed_memory(size_t max_bufsize);
51 lcpit_matchfinder_init(struct lcpit_matchfinder *mf, size_t max_bufsize,
52 u32 min_match_len, u32 nice_match_len);
55 lcpit_matchfinder_load_buffer(struct lcpit_matchfinder *mf, const u8 *T, u32 n);
58 lcpit_matchfinder_get_matches(struct lcpit_matchfinder *mf,
59 struct lz_match *matches);
62 lcpit_matchfinder_skip_bytes(struct lcpit_matchfinder *mf, u32 count);
65 lcpit_matchfinder_destroy(struct lcpit_matchfinder *mf);
67 #endif /* _LCPIT_MATCHFINDER_H */