Properly detect four spaces => z
Properly handle single null (\0) bytes
Add some tests for various ' ' and \0 corner cases