Pacific Tides
My name is Thomas Sturm and I'm a programmer, photographer and writer.

Now go outside and look at the sky.

Binary Data and JavaScript

It's probably some sort of sign of a new phase in the JavaScript life cycle - dealing with binary data.

For the longest time there wasn't much of a reason to worry about binary files - JavaScript was near exclusively used for text operations and simple number crunching. A multidimensional array maybe. Some objects and of course the DOM.

But binary? A while ago I've started work on a still-unfinished 68000 emulator in JavaScript (almost there!), and it was actually surprisingly hard to find good information about the bit operators in JavaScript.

And then there is the problem of how to get binary data into the script engine to begin with. It's not exactly easy. And after re-inventing the wheel several times in the last few months, I've finally posted my current favorite solution for this specific problem to the Stories In Flight site here as a reminder for myself. And if you've read this far, you may be interested in that binary loader, too. :-)

© 1998 - 2024 Thomas Sturm