Skip to content

Jakobzs/patternscanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

patternscanner

Build API Crate dependency status

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.6.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

MIT

Contributing

Contributions are welcome.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages