[Date Index] [Thread Index] [Author Index]
Re: Binary file I/O
> I am working with large datasets that I would prefer to store as binary > data rather than ASCII. These files could be, for example, single- or > double-precision numbers. What is the most efficient way of handling > input and output of such datafiles in Mma? I've considered writing an > external translator to read the data and pipe it to Mma in ASCII, but I > wonder if it is possible to access binary data in a file directly. > > Matt Reed > University of Michigan If you have a version of Mathematica which is MathLink capable, you should *definitely* be using Todd Gayley's FastBinaryFiles, available on MathSource as item number 0206-783. The interface to FastBinaryFiles is almost identical to the interface of the Utilities`BinaryFiles` package, which is documented in the book "Guide to Standard Mathematica Packages". The implementation, however, is at least an order of magnitude faster than Utilities`BinaryFiles`. John Fultz Wolfram Research, Inc.