Don't use NULL terminated strings.

The use of NULL terminated strings prevents data streams from using
zero. This commit adds a simple struct and changes the typedefs to pass
a size_t size explicitly.