NBT encoder and decoder
Nibbit is an easy to use encoder and decoder for the NBT serialisation format, created for and popularised by the game "Minecraft". It'll decode uncompressed NBT data only - decompression is your job.
doubleall the time.
Take a look at docs/ in the repo or the same thing hosted on github. Please note that these are HTML files generated by docco so you can also just read the comments in the source files in lib/ if you like.
var fs = require"fs"zlib = require"zlib"nibbit = require"nibbit";// decodingfsreadFile"./data/test.nbt"zlibgunzipcompressednbtdecodedataconsole.logdecoded;;;;// encoding and manual AST constructionvar ast = nbtcompoundnbtstring"Bananrama" "name""hello world";nibbitencodeastconsole.loguncompressed;;
3-clause BSD. A copy is included with the source.