binspector
pngextract
binspector | pngextract | |
---|---|---|
4 | 1 | |
217 | 0 | |
0.0% | - | |
1.8 | 1.8 | |
almost 3 years ago | about 3 years ago | |
C++ | Go | |
Boost Software License 1.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
binspector
pngextract
-
Why isn't there a Swagger/OpenAPI for binary formats?
My project Restruct[1] does Kaitai-like things but also supports serialization. Unfortunately, it only supports Go and only deals with Go struct tags rather than YAML manifests. Still, it totally can be used for serialization. I use it to sketch out quick projects against arbitrary binary formats. Two examples: one, parsing PNG headers to implement a quick binwalk-like program for just PNG that looks for the IEND chunk to extract accurately[2], two, a program that splits FL Studio FLP projects by playlist track[3].
I feel like I’ve self-promoted Restruct like four times on Hacker News, and I feel kind of bad because it could use improvements and even some bug fixes and I never seem to get around to it. Oh well. It’s still useful for me, I hope it’s useful for others, too.
That said, Kaitai has a fairly clear path towards adding serialization from a design PoV; many things that would be calculated for parsing structures in deserialization could just become checks/assertions in serialization. As an example, checking that an expression calculates out to the expected value would be a reasonable approach. Reversible expressions could be implemented for some cases, too, if you want it to do more of the heavy lifting. I think the biggest obstacle is actually implementing it, and frankly my Scala is too weak to help with such a relatively big undertaking.
I’ve also played with the rust nom library, which implements functional programming style parser combinators. It is quite cool how it can express fairly complex grammars and binary formats pretty much equally well, albeit optimizing it effectively requires serious magic that I do not think nom has. (I assume in Haskell, the same thing can be done with mind-boggling optimization power.)
[1]: https://github.com/go-restruct/restruct
[2]: https://github.com/jchv/pngextract
[3]: https://github.com/jchv/flsplit
What are some alternatives?
kaitai-to-wireshark - Converts a Kaitai Struct file description to a Wireshark LUA plugin
Kaitai Struct - Kaitai Struct: declarative language to generate binary data parsers in C++ / C# / Go / Java / JavaScript / Lua / Nim / Perl / PHP / Python / Ruby
unblob - Extract files from any kind of container formats
faq - Format Agnostic jQ -- process various formats with libjq
grpc-swagger - Debugging gRPC application with swagger-ui.
RecordFlux - Formal specification and generation of verifiable binary parsers, message generators and protocol state machines
flsplit - Simple tool to split FL Studio project files by playlist track.
rasn - A Safe #[no_std] ASN.1 Codec Framework
pkgsrc - Automatic conversion of the NetBSD pkgsrc CVS module, use with care
HexFiend - A fast and clever hex editor for macOS