Closed tooptoop4 closed 4 months ago
That should be very easy to implement, @tooptoop4. Is there a similar utility in Linux?
The implementation would look something like:
from stringzilla import File, Str
Str(File(path)).contains(chr(0))
I will memory-map the file without loading it into RAM and will scan until the first occurrence. Feel free to suggest a better implementation and open a Pull Request 🤗
is there a cli version to check if the ascii nul character exists in a file or not? could stop searching after finding first occurrence. ideally without trying to read the entire file into memory