Crates.io | patternscanner |
lib.rs | patternscanner |
version | 0.5.0 |
source | src |
created_at | 2023-01-03 16:56:50.624477 |
updated_at | 2023-06-06 19:42:56.440651 |
description | A high performance multithreaded pattern scanner |
homepage | |
repository | https://github.com/jakobzs/patternscanner |
max_upload_size | |
id | 750263 |
size | 13,264 |
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.
Add this crate as a dependency to your Cargo.toml
file.
[dependencies]
patternscanner = "0.5.0"
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]);
}
Contributions are welcome.