One of the great things coming in “HTML5″ is the File API. Basically, this API provides a means to access local files without handing to first POST the data to a server. This allows for completely client-side web applications which can handle any number of file formats.
Lastly, and most troublesome, I had to figure out a way to read in and handle 64-bit integers that NBT uses as TAG_Long. I had this same exact problem in PHP, so I already knew roughly how to deal with it. It took me a while to decide upon a library, but our good friend (apparently) Jonas Raoni Soares Silva, who had written the Binary Parser library, had also written a Big Number library that handles arbitrary-precision values quite elegantly.
Conclusion (The resulting script)
My resulting script will probably see a bit of cleaning-up, and I’m going to take a stab at adding in the ability to write the file back out.
Here’s the SVN Repository.
July 30th, 2011: I’ve moved this project to a github repository. All future updates will happen there.