Implement message writer.

This should be an `AssertionError`, right? Ie. we'll never call this with the wrong byteCount