The flags are a part of size_and_flags to save on allocation overhead. This cuts the maximum string size from 4,294,967,295 bytes to 536,870,911 bytes but saves at least a byte in allocation overhead.
flags
size_and_flags