Mesh writing and reading.