Have a look at BlockRead and Blockwrite. They allow you to write records of anysize to a file.