Lines Matching refs:sset
83 Bytes(ref sset) => sset.find(haystack).map(|i| (i, i + 1)),
124 Matcher::Bytes(ref sset) => LiteralIter::Bytes(&sset.dense),
151 Bytes(ref sset) => sset.dense.len(),
163 Bytes(ref sset) => sset.approximate_size(),
173 let sset = SingleByteSet::prefixes(lits);
174 Matcher::new(lits, sset)
178 let sset = SingleByteSet::suffixes(lits);
179 Matcher::new(lits, sset)
182 fn new(lits: &Literals, sset: SingleByteSet) -> Self {
186 if sset.dense.len() >= 26 {
189 // between the bytes in sset and the composition of the haystack.
190 // No matter the size of sset, if its members all are rare in the
195 if sset.complete {
196 return Matcher::Bytes(sset);
203 let is_aho_corasick_fast = sset.dense.len() <= 1 && sset.all_ascii;
295 let mut sset = SingleByteSet::new();
297 sset.complete = sset.complete && lit.len() == 1;
299 if !sset.sparse[b as usize] {
301 sset.all_ascii = false;
303 sset.dense.push(b);
304 sset.sparse[b as usize] = true;
308 sset
312 let mut sset = SingleByteSet::new();
314 sset.complete = sset.complete && lit.len() == 1;
316 if !sset.sparse[b as usize] {
318 sset.all_ascii = false;
320 sset.dense.push(b);
321 sset.sparse[b as usize] = true;
325 sset