patterns

Crates.iopatterns
lib.rspatterns
version0.2.5
sourcesrc
created_at2023-04-07 15:46:51.123116
updated_at2023-12-28 02:36:36.877399
descriptionno_std compatible pattern scan library using simd
homepage
repositoryhttps://github.com/greaka/patterns
max_upload_size
id832986
size12,622
(greaka)

documentation

README

Pattern matching library

Allows you to search for a pattern within data via an iterator interface.

This library uses the core::simd abstraction and does not allocate.

Usage

use patterns::Pattern;

let data = [0_u8; 1_000_00];
// Allows . and ? as wildcard.
// Any number of wildcard characters between spaces is considered a wildcard byte.
let pattern: Pattern = "01 02 00 ? 59 ff".parse().unwrap();
let mut iterator = pattern.matches(&data);

for _found in iterator {
    // use _found
}
Commit count: 19

cargo fmt