News for hackers. Stuff that matters.
Re:Construct-JS – A library for creating byte level data str... by BlackMonday on Monday March 18, 2019 @08:16AM (#19420430)
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/

Re:Construct-JS – A library for creating byte level data str... by lopatin on Monday March 18, 2019 @08:33AM (#19420506)
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...

Re:Construct-JS – A library for creating byte level data str... by catern on Monday March 18, 2019 @10:59AM (#19421584)
Kaitai doesn't (currently) support writing out data, only reading it in, so this is fairly different.