@param fp File handle for the data file being written. @return 0 on success, <0 on failure.
See Implementation
@param fp File handle for the data file being written. @return 0 on success, <0 on failure.