returnthe rawdata as it will be written to file
returnthe length in bytes that the data uses when written to file