7 releases (breaking)
0.5.0 | Jun 6, 2023 |
---|---|
0.4.0 | Jan 10, 2023 |
0.3.1 | Jan 6, 2023 |
0.2.0 | Jan 3, 2023 |
0.0.0 | Jan 3, 2023 |
#20 in #wildcard
32 downloads per month
11KB
215 lines
patternscanner
A high performance pattern scanner for bytes.
This pattern scanner supports both single-threaded as well as multi-threaded scanning. Additionally, it is possible to include a wildcard ?
in the pattern.
Installation
Add this crate as a dependency to your Cargo.toml
file.
[dependencies]
patternscanner = "0.5.0"
Example
use patternscanner::PatternScannerBuilder;
fn main() {
let result = PatternScannerBuilder::builder()
.with_bytes(&[0x00, 0x01, 0x02, 0x33, 0x35, 0x33, 0x35, 0x07, 0x08, 0x09])
.build()
.scan_all("33 35")
.unwrap();
assert_eq!(result, vec![3, 5]);
}
License
Contributing
Contributions are welcome.
Dependencies
~1.4–2MB
~42K SLoC