←back to thread

187 points xy2_ | 5 comments | | HN request time: 1.649s | source
1. netsharc ◴[] No.42075000[source]
Wow, I've never thought of it, but "syntax"-highlighting for binary files would be awesome.. e.g. "these bytes indicate the beginning of the next frame" (when talking about MP3/video files), maybe with mouseover support where it says e.g. "this value at this location indicates it's a $FOO variant of the file".

Anyone know of such a tool?

replies(3): >>42075030 #>>42075087 #>>42075347 #
2. frabert ◴[] No.42075030[source]
010 editor has something like this. Okteta too. They both use DSLs to represent formats
replies(1): >>42077501 #
3. pie_flavor ◴[] No.42075087[source]
I deal with a lot of cryptographic documents (e.g. public keys) and https://lapo.it/asn1js/ is a godsend for making sense of them. You just paste in hex or pem, and it shows the full deconstructed format along with two-way 'syntax highlighting' where if you hover over part of the deconstruction it highlights the equivalent part of the binary data. Hit the 'load' button for a representative example.
4. tripflag ◴[] No.42075347[source]
Kaitai Struct has an online demo which basically does this; https://ide.kaitai.io/
5. AstroJetson ◴[] No.42077501[source]
+1 for the 010 editor. It comes with a number of pre-built binary templates, I use the sqlite one all the time. A recent upgrade got syntax coding by the tree-sitter environment, which is a great upgrade. Highly recommended.https://www.sweetscape.com/010editor/