Skip to content
Pre-check a corpus for a literal

Pre-check a corpus for a literal

Pre-check a corpus for a literal

Build a small presence filter over a corpus once, then answer whether a literal might occur in it without scanning the corpus again. A filter never says a present literal is absent; a “might occur” is confirmed by an exact search (prefilters).

$ cat corpus.txt
the quick brown fox ERROR here
warn: disk at 91% full
$ trex prefilter corpus.txt --literal ERROR --literal MISSING
bloom: "ERROR" -> might occur; present (confirmed)
bloom: "MISSING" -> ABSENT (rejected with no corpus scan)

--filter cuckoo and --filter xor build the other two filters, and --verify checks every filter over the corpus: no literal present is ever reported absent.