twoway
twoway copied to clipboard
provide find_bytes for impl std::io::Read
I recently needed to search for any occurrence of a sequence of bytes in a large file, so I built an iterator for matches in a file. Would you consider a PR for this?
It's quite out of scope unfortunately. How would you bridge between different chunks?
I advance the buffer for buffer.len() - pattern.len() + 1 whenever I hit the end using buffer.copy_within(). I just figured I'd ask if you'd want it in here before publishing my own microcrate.