Wolfram Library Archive

Courseware Demos MathSource Technical Notes
All Collections Articles Books Conference Proceedings

The Mathematica Toolbox: A MathLink Program for Accessing Binary Files

Todd Gayley
Organization: Wolfram Research, Inc.
Department: Kernel Technology
Journal / Anthology

The Mathematica Journal
Year: 1994
Volume: 4
Issue: 2
Page range: 44-51

This article describes FastBinaryFiles, a MathLink program and Mathematica package for fast reading and writing of binary files. It is intended as a replacement for the standard package Utilities`BinaryFiles`, which is slow and cannot be run on Windows machines. FastBinaryFiles is a good example of a non-trivial MathLink program, and it provides the context for a discussion of some MathLink programming issues.

A ready-to-run executable is available for Mac, Power Macintosh, and Windows (note that binary.zip contains a separate executable, binary22.exe, for Mathematica 2.2 users). Unix users will have to build the program from the single source file, binary.tm. Note that there is no separate package (.m) file. If you want to use the program on Mac or Windows, the executable is all you need. If you want to compile it on your own, the C source file binary.tm is all you need. You need Mathematica version 2.2.2 or later to use FastBinaryFiles.

*Wolfram Technology > Front End > Importing
*Wolfram Technology > Linking Technology > MathLink