MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / find_bytes

Function find_bytes

rust/src/files.rs:678–682  ·  view source on GitHub ↗
(buffer: &[u8], bytes: &[u8])

Source from the content-addressed store, hash-verified

676}
677
678pub fn find_bytes(buffer: &[u8], bytes: &[u8]) -> Option<usize> {
679 buffer
680 .windows(bytes.len())
681 .position(|window| window == bytes)
682}
683
684pub fn collect_files_from_cache<F: Fn(&DirEntry) -> bool>(
685 cache_path: &PathBuf,

Callers 1

uncompress_sfxFunction · 0.85

Calls 2

positionMethod · 0.80
windowsMethod · 0.80

Tested by

no test coverage detected