typecast to silence warning
ignore null bytes
add tests for corpus and scanner