First of all don't use a text stream. Instead operate on the file directly, it's faster this way. Second of all try to convert directly to the output format instead of going through many different transformations (like float -> string -> byte array). mmap()ing a file to memory might also help pretty much.
Bookmarks