About
The null character (also known as null terminator) 1), abbreviated NUL, is a control character with the value zero
Position
It's the first character of most of the character set such as ASCII and unicode
You can get it with the 0 code point.
Example in Javascript:
String.fromCodePoint(o);
Header
The null character may be used to determine an header position in a file.
Ie all previous characters may be part of an header that adds extra metadata information.
For instance 2), git will add:
- the type of object
- a space
- the size in bytes of the content
- and a final null byte.
header = "blob #{content.bytesize}\0"