BinData.js is a simple and structured way to read and write binary data. Instead of having to remember a whole table of obscure character codes, you can write and encapsulate chunks of binary data together with ease.
BinData.js aims to be a very close port of Ruby's BinData library.
Data record definition
endian: "little": ->@uint16 "len"@string "name"length: 4@uint32 "width"@uint32 "height"
Reading a data record
file = BinDataFileopen"/path/to/file"r = filerreadconsolelog "Rectangle is x "