Hacker News new | ask | show | jobs
by BlackMonday 2656 days ago
If you can live with compiling a declarative yaml description and only need to read the data then there is also kaitai-struct. [0] One of the compilation targets is javascript. Their web ide (feels kind of like a simple sweetscapes 010 editor) which is quite nice uses the js target. [1] Other targets are c++, java, php, python, ruby and more.

I used it in the past to read a proprietary file format and it worked well, but they also have quite a few predefined formats in their gallery. [2]

[0] http://kaitai.io/

[1] https://ide.kaitai.io/

[2] http://formats.kaitai.io/

2 comments

What’s the difference between something like this and tools like protobuf?

Edit: this provides a good explanation http://doc.kaitai.io/faq.html#_google_protocol_buffers_asn_1...

Kaitai doesn't (currently) support writing out data, only reading it in, so this is fairly different.