Wireshark has a similar feature where you can open an ELF, or PNG and look at the sections. The LUA interface isn't to shabby either to write such "dissectors".