4 ms·
Trying not to be a downer, but I wouldn't think of writing such a tool. I'd use Perl's pack or Python's struct. Of course there might be some value in somethi
by emmelaich 8y ago
Trying not to be a downer, but I wouldn't think of writing such a tool. I'd use Perl's pack or Python's struct.
Of course there might be some value in something less than a full language.
- elcritch 8y agoWas going to say I agreed with the sentiment. I didn't know about `struct` or `pack`, but Elixir (& Erlang) have a similar "special form" binary structures. Though reading both `pack` and `struct` the formats are about as obtuse as a regex. And the lack of individual bit support in `struct` is limiting. Come to think of it, like other comments already, this could be a handy CLI streaming tool. Dealing with adjusting binary output on the CLI turns out to be a pain...
- kamaal 8y agoPerl's pack is not very easy to understand though. If you have a intuitive tutorial. Do share.
- b6z 8y agoI like the included http://perldoc.perl.org/perlpacktut.html http://perldoc.perl.org/perlpacktut.html.