Simplify writing stream metadata.