Currently a call to write() entails the following:
Open file, write header, close file
Open file, write data, close file
It'd be cleaner to just open the file once and pass this file object to the various write*() functions. This will bring a (likely minuscule) performance benefit, but the main reason to do it is just to make the code clearer.
Currently a call to
write()
entails the following:It'd be cleaner to just open the file once and pass this file object to the various
write*()
functions. This will bring a (likely minuscule) performance benefit, but the main reason to do it is just to make the code clearer.