Without any headers, metadata or padding and using RLE one byte for 0 and 8 bytes for the number of zeroes: 10^15 will easily fit 9 bytes and can be used to generate a file filled with one petabyte of zeroes.
It's actually good practice to wrap a bit of code like that in a function with a name, as long as it isn't in some kind of extremely frequently executed inner loop.
'starts_with' is descriptive and language agnostic where '=== 0' is neither.
I don't see a way to comment on the article itself, but hopefully the author reads this.